Invalid formula?

Stevekgreer

New Member
Joined
Apr 7, 2019
Messages
4
I am running Excel 2003. This formula keeps coming up "invalid" and I am unable to find my mistake. ANY help is greatly appreciated!!

=IF(AND(ISBLANK(E15),ISBLANK(E17),ISBLANK(E18)),"",IF(AND(ISNUMBER(E15),ISNUMBER(E17),ISNUMBER(E18)),E15+E17+E18,
IF(AND(ISNUMBER(E15),ISNUMBER(E17),ISBLANK(E18)),E15+E17,IF(AND(ISNUMBER(E15),ISBLANK(E17),ISNUMBER(E18)),E15+E18,
IF(AND(ISBLANK(E15),ISBLANK(E17),ISNUMBER(E18)),E18,IF(AND(ISBLANK(E15),ISNUMBER(E17),ISNUMBER(E18)),E17+E18,
IF(AND(ISBLANK(E15),ISNUMBER(E17),ISBLANK(E18)),E17,"")))))))

I have run the "Insert - Function" check, and all my checks come up ok - no red invalid flags. I've checked my tautology and I think I've covered all the bases. I have 3 cells that I have to check. Each cell can either be blank or contain a value. I need to isolate the cell(s) with the value(s) and add them together for the result, or, if only one cell has a value, post that value, or if none have values, leave the target empty.

I know it's a lot of nested if's, so feel free to give this on a pass, or copy & past and go for the ring.
Thanks in advance for any and all help
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
This worked for me.....but you have exceeded the IF limit for 2003, which is 7 IF's in a formula

Code:
=IF(AND(E15="",E17="",E18=""),"",IF(AND(E15<>"",E17<>"",E18<>""),E15+E17+E18,IF(AND(E15<>"",E17<>"",E18=""),E15+E17,IF(AND(E15<>"",E17="",E18<>""),E15+E18,IF(AND(E15<>"",E17<>"",E18=""),E15+E17,IF(AND(E15<>"",E17="",E18<>""),E15+E18,IF(AND(E15="",E17="",E18<>""),E18,IF(AND(E15="",E17<>"",E18<>""),E17+E18,IF(AND(E15="",E17<>"",E18=""),E17,"")))))))))

but what are you trying to do ....does text get used in any of the cells.

This also did the same for me...

Code:
=IF(AND(E15="",E17="",E18=""),"",E15+E17+E18)
 
Last edited:
Upvote 0
If there is a chance of text getting entered, You could also use....

Code:
=IF(AND(E15="",E17="",E18=""),"",IF(OR(ISTEXT(E15),ISTEXT(E17),ISTEXT(E18)),"no text allowed",E15+E17+E18))
 
Upvote 0
If there is a chance of text getting entered, You could also use....

Code:
=IF(AND(E15="",E17="",E18=""),"",IF(OR(ISTEXT(E15),ISTEXT(E17),ISTEXT(E18)),"no text allowed",E15+E17+E18))

Tremendous appreciation to all. Especially those who know the limitations with 2003! I have reworked the formula and resolved my dilemma.
Thanks again for your valuable time.
 
Upvote 0
Tremendous appreciation to all. Especially those who know the limitations with 2003! I have reworked the formula and resolved my dilemma.
Thanks again for your valuable time.
 
Upvote 0
Glad we could help
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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