Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel OFFSET help please.

Status
Not open for further replies.

tecnik

Programmer
Feb 16, 2006
22
GB
Hi there,

I'm having problems trying to get the result of a cell that contains the formula below:-

=IF(J18=1,"L8",IF(J18=3,"N8",IF(J18=2,"M8","0")))

into this OFFSET:-

=OFFSET(L8,K18,0)

So depending on dependent on a dropdown selection the value would change between L8, M8 and N8.

I know the top formula is working ok from the results I'm getting, however I want to use that value in the offset.

Basically I have a dropdown that allows the user to pick one of three values. Their selection influences which column of values, out of three, is then used in further calculations.

Hope that's clear.

Thanks in advancee,

Nick
 
To change a string into a reference use INDIRECT ...

=OFFSET(INDIRECT(L8),K18,0)


Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
If your initial formula is in A1 then:

=OFFSET(INDIRECT(A1),K18,0)

should do the trick if I understand you correctly

Amend A1 for wherever the =IF(J18=1,"L8",IF(J18=3,"N8",IF(J18=2,"M8","0"))) formula is

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Thanks for the help guys, it all works fine now.

Cheers,

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top