Excel functions

F

Falz

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel

I'm trying to create a function in Excel and I'm not sure if it can't be done or if I'm just not doing it right. Basically in one cell I have a list of 5 options, based on the selection I want to put a number in another cell.

So, =IF(g4="HK", 545, " ") OR IF(g4="EM", 665, " ") OR IF(g4="FS", 1190, " "), etc.

Where HK, EM and FS are options from the list mentioned above. So, if HK is in cell g4, I want 545 inserted into another cell. But if EM is in cell g4, then I want 665 to be inserted into the other cell.

I hope that makes sense, Can it be done??

Thanks
 
B

Bob Greenblatt

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel

I'm trying to create a function in Excel and I'm not sure if it can't be done
or if I'm just not doing it right. Basically in one cell I have a list of 5
options, based on the selection I want to put a number in another cell.

So, =IF(g4="HK", 545, " ") OR IF(g4="EM", 665, " ") OR IF(g4="FS", 1190, " "),
etc.

Where HK, EM and FS are options from the list mentioned above. So, if HK is in
cell g4, I want 545 inserted into another cell. But if EM is in cell g4, then
I want 665 to be inserted into the other cell.

I hope that makes sense, Can it be done??

Thanks
You can not do this. A formula in a cell can ONLY return a value to that
cell. Additionally, a called function can also only return a value to the
cell containing it. To do what you want, you will have to put a formula in
"the other cell" to look at values in g4.
 

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