IF results are one of multiple values

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
The following formula is resulting in a #VALUE! error indicating I've done something wrong. I want Excel to done one thing if the RIGHT is A, E, G, or K, and do something different if the result is C or H. And leave the cell blank if D12 does not contain 3000. Can anyone help me correct the formula? An example of the data in C49 would be CC12-S-A.

Excel Formula:
=IF(D12=3000,IF(RIGHT(C49,1)=OR("A","E","G","K"),ROUNDUP(E12/18,0)*2,IF(RIGHT(C49,1)=OR("C","H"),ROUNDUP(E12/18,0),"")))
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about
Excel Formula:
=IF(D12=3000,IF(OR(RIGHT(C49,1)={"A","E","G","K"}),ROUNDUP(E12/18,0)*2,IF(OR(RIGHT(C49,1)={"C","H"}),ROUNDUP(E12/18,0),"")),"")
 
Upvote 0
Solution
MAYBE


=IF(D12<>3000,"",IF(OR(RIGHT(C49,1)="A",RIGHT(C49,1)="E",RIGHT(C49,1)="G",RIGHT(C49,1)="K"),"I AM A E G OR K",IF(OR(RIGHT(C49,1)="C",RIGHT(C49,1)="H"),"I AM C OR H","")))

add what you wan to happen where th text is
 
Upvote 0
Maybe like this

Excel Formula:
=IF(D12=3000,ROUNDUP(E12/18,0)*IF(MAX(--(RIGHT(C49,1)={"A","E","G","K"})),2,IF(MAX(--(RIGHT(C49,1)={"C","H"})),1)),"")
 
Upvote 0
Another variation:

Excel Formula:
=IF(D12=3000,IFERROR(ROUNDUP(E12/18,0)*IF(SEARCH(RIGHT(C49),"AEGKCH")<5,2,1),""),"")
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,852
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top