View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default IF TYPE FUNCTION

Steve wrote:
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.