I am trying to write a formula to do the following:
If O2 = either D3,D5,D5, or S8 use code 1, If O2 = either S0,S1, or S2 use code 2, If O2 = SS use code 3.
Thank you for your help.
I am trying to write a formula to do the following:
If O2 = either D3,D5,D5, or S8 use code 1, If O2 = either S0,S1, or S2 use code 2, If O2 = SS use code 3.
Thank you for your help.
D3,d5, d5?
Diana Tanase
If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !
Assuming you meant D3, D4, D5 and not D3, D5, D5....
=IF(OR(O2=D3,O2=D4,O2=D5,O2=S8),"code 1", IF(OR(O2=S0,O2=S1,O2=S2),"code 2",IF(O2=S??,"code 3",""))).
Most of those look like cell refs, but the last 1 SS...was that a typo?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
OH boy, it was actually easier than that guys. the codes I was using were actual codes NOT cell values. Ha... but its working so thanks!
Great, happy to help and thanks for the feedback
If those are really just codes, you could probably save a lot of formula usage by making a small table and using vlookup.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks