views:

37

answers:

2
=vlookup(c2,code1,2,false)

I am using the vlookup code but I would like to use the cell value in 'c2' rather than c2 itself. The value within this cell will change, at the moment it is 'aj2'. Is there an easy way of doing this?

Hi Thanks, that doesn't seem to work for what I want. I suppose it might be easier if I explain what I want to do eventually. I would like to be able to type in a column reference i.e. B (excluding the cell row).

Sheet1 (Input column reference)

A-B
Code1-B (this cell value will change)

Sheet2 (Name reference 'code1')

A-B
Pre Start -1
Established-2

Sheet3 (Data pasted from another file-this data will change)

A-B-C
1-Pre Start- =vlookup (Show '1' from the code1) 2-Established- =vlookup (Show '2' from the code1)
3-Established- =vlookup (Show '2' from the code1)
4-Pre Start- =vlookup (Show '1' from the code1) 5-Pre Start- =vlookup (Show '1' from the code1)

+1  A: 
=VLOOKUP(INDIRECT(c2),code1,2,false)
Lance Roberts
Thanks, I forgot to say I need to reference the column only i.e. 'c'. I have edited my post above...if you can help at all?
Keziah Dorman
@Keziah, All you do is click and drag this formula down the rows you need and it will automatically change the reference.
Lance Roberts
Thanks, that has helped loads.Kez
Keziah Dorman
A: 

You could use =INDIRECT:

=VLOOKUP(INDIRECT(C2), code1, 2, FALSE)
Tim Robinson