IF TYPE FUNCTION

S

Steve

I have office student 2003 excell. My problem is getting a single cell to be
examined for content and based what is in there will do one of many things.
ie cell 1 has "A" value and does "z work", if cell 1 has "B" value and does
"y work", if cell 1 has "C" value and does "x work" etc. "IF" statement will
only allow me to do a true or false with an excution. "OR" state will only
allow me to check the cell but not perform something else.
 
S

Steve

-- Thank you that looks like my answer. I'll have to check this out in the
morning.
You indicate that there maybe a different way what is it?
Steve


smartin said:
Steve said:
I have office student 2003 excell. My problem is getting a single cell to be
examined for content and based what is in there will do one of many things.
ie cell 1 has "A" value and does "z work", if cell 1 has "B" value and does
"y work", if cell 1 has "C" value and does "x work" etc. "IF" statement will
only allow me to do a true or false with an excution. "OR" state will only
allow me to check the cell but not perform something else.

One way is to use nested IF statements:

=IF(A1="A",[z work],IF(A1="B",[y work],IF(A1="C",[x work],[default work])))

This construct has its limitations and can get a little tedious to code
and debug. Depending on your actual situation, there might be a better way.
 
S

Sean Timmons

If you have many possibilities, you may want to go with a VLOOKUP.

Create a table with your value list in, say, Sheet2, column A and your work
result in column B.

in your desired result cell, type =VLOOKUP(A2,Sheet2!A:B,2,0) to return the
B value.
 

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