# Value Error - if and statement

jgold20

Board Regular
Joined
Feb 4, 2018
Messages
135
I have a if and statement that I am receiving a value error on. If I just use 1 if statement it works properly. When I add a second if statement, I receive a #Value error




=IF(AND(C3="B",I3="YES"),"Min. Amt / 286","") +
IF(AND(C3="W",I3="YES"),"Min. Amt / 286","")
 
It seems my assumptive stipulations do not hold.

We need mutually exclusive if-then rules. Otherwise, it is hard to cover all possibilities.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
It would have been nice if you had explained in Detail what you are looking to accomplish at the beginning, so we don't have to guess and spend time on asking questions back and forth and spend time on coming up with solutions that's Not relevant to what You have in mind.

Based on the previous 3+ pages of Q & A, there would be 7 possible combination of outcomes (8, if we include "Blank" when I3 is not "Yes"), this seems to be the solution for your question.


Book1
CDEFGHI
2Company CodeSpecial InstructionsEnter Min. Move Amt.Min.Price per CFFiling OR Scheduling & CC FeesMinimum Move
3Bto West: NM,AZ,CA,ND,OR, WA,SD,WA,ID,WY,CO,NE$1,500.00$5.24NOYES
4L$1,500.00$ -Min. Amt / 200 / 286 / 300
5N$1,500.00$ -
6W$1,500.00$5.24
7MD$ -
Sheet58
Cell Formulas
RangeFormula
I4=IF(I3="Yes","Min. Amt / "&CHOOSE(SUM(IF(SUM(COUNTIF(C3:C7,{"B","W"}))>=1,1,0),IF(SUM(COUNTIF(C3:C7,{"MD","MN"}))>=1,2,0),IF(SUM(COUNTIF(C3:C7,{"<>B","<>W","<>MD","<>MN"}))>=16,4,0)),286,300,"286 / 300",200,"200 / 286","286 / 300","200 / 286 / 300"),"")


I've read your previous post here: https://www.mrexcel.com/forum/excel-questions/1045070-if-statement-problem.html#post5016745

So I hope you have "cleaned-up" the values in your drop down list; otherwise, my (or anyone's) formula will fail.
Also, I see that you keep using the plus sign ( + ) to combine IF statements, you might want to google "Excel IF function" and "Excel Nested IF" to get a better understanding of how to write them.
 
Last edited:
Upvote 0
C3:C7 will always have an ALPHA value

C3=B, C5=H, all other cells are empty >> / 286, / 300, / 200

C3=B, C4=H, C5=Q, C6=R, C7=X >> / 286 /200

C3=B, C4=MN, all other cells are empty >> / 286, / 300, / 200

C3=MD, C4=H, C5=Q, C6=R, C7=X >> / 300 /200

C3=B, C4=B, all other cells are empty >> / 286

C3=MD, C4=H, C5=B, C6=H, C7=R >> / 300 / 286 /200

C7=L, all other cells are empty >> / 286, / 300, / 200
C7=L, all other cells are empty >> / 286, / 300, / 200

C3=D, C4=H, C5=V, C6=H, C7=R >> /200

Hi!

I think you should explain the rules to the desired results of the posts #29 and #30.

Markmzz

 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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