Search code examples
excelcell

excel : using values from a cell to point at another cell


I'm certain it must be possible but I can't find the way to do this.

I have 2 columns, one with numbers and a second column with dates.

for example:

number date

1 21-Jul

2 22-Jul

3 23-Jul

4 24-Jul

5 25-Jul

6 26-Jul

7 27-Jul

8 28-Jul

9 29-Jul

10 30-Jul

At the top I have 2 cells one where I want to enter the relevant number and one where the connected date should be displayed.

Say the cell with 1 is cell B10 and the first date is C10 If I enter 1 in the cell above the other cell shoould display the date from C10 If I enter 7 in one cell the other should display the date from C16.

How do I use the number entered in one cell to point at another cell? I tried things like

A1 - cell with the number

B1 - =C(9+A1)

but it isn't that simple.

It's frustrating how something that seems so simple is impossible for me to figure out. I look forward to your replies.


Solution

  • I think you need the function VLOOKUP. Specifically, in cell B1 enter:

    =VLOOKUP(A1,$b$10:$C$20,2,false)
    

    Where

    • A1 is the input cell,
    • B10:C20 is the range containing your numbers/dates
    • 2 tells EXCEl to lookup the value in the second column
    • FALSE is a setting that forcesw Excel to find an exact match