Multiplying where a field may be blank
Hi!
I am multiplying 3 columns + multiplying the next 3 columns to get a sum of the total cost. However, here is an instance where "1455 REP Gallons Used" is blank. I am getting the old Invalid Operation now.
Would "if error" fix this and if so, where would it go?
=IF(ISBLANK([1455 MU Gallons used]@row), "", IF([1455 MU Gallons used]@row = 0, "", ([1455 MU LBS PER GALLON]@row * [1455 MU Gallons used]@row * [1455 MU Price per lb ($)]@row) + ([1455 REP lbs per Gallon]@row * [1455 REP Gallons used]@row * [1455 REP Price per lb ($)]@row)))
Answers
-
It depends on what you want the result to be in these types of scenarios. You can make easily make the total cost column be blank by using.
=IFERROR(IF(ISBLANK([1455 MU Gallons used]@row), "", IF([1455 MU Gallons used]@row = 0, "", ([1455 MU LBS PER GALLON]@row * [1455 MU Gallons used]@row * [1455 MU Price per lb ($)]@row) + ([1455 REP lbs per Gallon]@row * [1455 REP Gallons used]@row * [1455 REP Price per lb ($)]@row))),"")
-
It gave me a "invalid argument" when I add that.
-
Hey @Elizabeth Aird
Try this:
=IF(OR([1455 MU Gallons used]@row = "", [1455 MU Gallons used]@row = 0), 0, ([1455 MU LBS PER GALLON]@row * [1455 MU Gallons used]@row * [1455 MU Price per lb ($)]@row)) + ([1455 REP lbs per Gallon]@row * [1455 REP Gallons used]@row * [1455 REP Price per lb ($)]@row)
It looks to see if Gallons Used is blank or 0 and if it is, makes this 0 + the rest of the formula. Otherwise if it's not blank or 0, it does your multiplications + the rest of the formula.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Still getting an incorrect argument..
-
Hey @Elizabeth Aird
Is it possible you may have put a parentheses in the wrong place? Would you mind posting a screen capture of it open in your sheet, like so:
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
I did finally get it to work.. thank you!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 430 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!