Lookup row, dependant on cell value?

S

Simon

I have a sheet, as per the example. I need to insert into column A the
quantities, depending on the value a specfic cell.

I.e if week 2 is entered, the column A should read, 12,5,2,3,3,3 and if Week
1 is entered 5,3,2,3,2,2 etc

I have looked at using HLOOKUP, however this does not replicate the
reference cell corrected unless each line is configured serperately.

What is the easiest way to acheive this. At the moment I need to select the
column manually, and replicate down the sheet, rather than just enter the
required week number into a cell, and let excel adjust automatically.

1 2 3 4 5
x Location 5 12 1 3 2
x Alabama 3 5 6 2 2
x Denver 2 2 3 4 2
x Boston 3 3 5 9 2
x New York 2 3 9 5 2
x Seattle 2 3 4 6 9



Week Number 2
 
P

Pete_UK

With your data set occupying B2:G7 and with the week number entered
into cell C9, enter this formula in A2:

=INDEX(C2:G2,C$9)

and copy down to A7.

Hope this is what you wanted.

Pete
 
S

Simon

Perfect!!

thanks

Pete_UK said:
With your data set occupying B2:G7 and with the week number entered
into cell C9, enter this formula in A2:

=INDEX(C2:G2,C$9)

and copy down to A7.

Hope this is what you wanted.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top