Unable to derive Simple Multiplication result with IF(AND.... Cell Value 0 or Blank

RapchikM

Board Regular
Joined
Oct 5, 2020
Messages
97
Office Version
  1. 2021
Platform
  1. Windows
Hello
Can anyone help me to correct the following formula uisng IF(AND....

I am trying to put value in Cell E57 as 0 or leave E57 as blank then Why does the following formula don't work ?
in cell H57 i ve incorporated the following formula
=IF(AND(E57="",E57=0), D57*1*F57, D57*E57*F57)

if Cell E57 = 0 then Multiplication result is derived But if Cell E57 is Blank then H57 = 0 instead of Calculated value

How can i derive a simple mulitplication result with Cell incoropated with 0 , 0.00 and with Cell Blank


RapchikM
 
Sir My Mistake in Posting the range Kindly Correct as Below
range is from D16: H19

D E F G H
13​
1.65​
21.45
13​
200​
4.10​
106.60
13​
200​
7.45​
193.70
13​
322​
8.25​
345.35
667.10
Want in H20 the sum using the IF(OR formula...... as 667.10

in H16 formula written =IF(OR(E16="",E16=0), D16*1*F16, (D16*E16*F16)/100)

Hope The above range makes it clear

RachikM
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
What about

Excel Formula:
=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100
 
Upvote 0
Excel Formula:
=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100
I get error #Value
 
Upvote 0
sumproduct-formula.xlsx
DEFGH
161301.6521.45
17132004.10330.00106.60
18132007.45330.00193.70
19133228.251238.90345.35
20#VALUE!
Sheet1
Cell Formulas
RangeFormula
G17:G19G17=G16+(E17-E16)*F16
H16:H19H16=IF(OR(D16="",D16=0), 1*F16, IF(OR(E16="",E16=0),D16*1*F16,(D16*E16*F16)/100))
H20H20=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)*100
 
Upvote 0
Thanks for the XL2BB sample. Unfortunately it did not help determine why you have an error. When I copied your sheet directly to mine it did not reproduce that error.
I'm also wondering why you changed from dividing by 100 to multiplying by 100 as that will change completely what my formula does?

Below I have repeated your sheet and added my original formula in cell H21.

What happens if you take a new blank worksheet then copy from my post here by clicking the copy button near the top-left of the mini sheet ..
1620276836567.png

.. then select cell D16 in your fresh sheet and then Paste?

If you still get an error, try selecting the formula cell, press F2 and then re-confirm the formula with Ctrl+Shift+Enter, not just Enter.


RapchikM.xlsm
DEFGH
161301.6521.45
17132004.1330106.6
18132007.45330193.7
19133228.251238.9345.345
206670950
21667.095
Sheet2
Cell Formulas
RangeFormula
G17:G19G17=G16+(E17-E16)*F16
H16:H19H16=IF(OR(D16="",D16=0), 1*F16, IF(OR(E16="",E16=0),D16*1*F16,(D16*E16*F16)/100))
H20H20=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)*100
H21H21=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100
 
Upvote 0
Peter_SSs
press F2 and then re-confirm the formula with Ctrl+Shift+Enter, not just Enter.
Do i have to always do the ? for eg if range is copied to different sheet as this was observed and
why not just incorporate {=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100} and press Enter

HatsOff to your expertize guidance

Thank you so much

RapchikM
 
Upvote 0
Sir
why not just incorporate {=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100}
{=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100}

1. If you may please explain Why have you Entered 100 marked in Bold and italic ?

2. What would be appropriate Formula to get 677.10 if My Cell E19 Value will be always 500
because in Cell C20 i've incorporated as 822 and to get result of 677.10 in cell H20 i need to 822-500 = 322 and therefore the result is 677.10
But when E19 is with value 500 then Cell Value is H20 858 i've purposely put the value in H21 677.10

sumproduct-formula.xlsx
CDEFGH
161301.6521.45
17132004.10330.00106.60
18132007.45330.00193.70
19135008.252565.00536.25
20822858.00
21677.10
Sheet1
Cell Formulas
RangeFormula
G17:G19G17=G16+(E17-E16)*F16
H16:H19H16=IF(OR(D16="",D16=0), 1*F16, IF(OR(E16="",E16=0),D16*1*F16,(D16*E16*F16)/100))
H20H20=SUMPRODUCT(D16:D19*IF(E16:E19=0,100,E16:E19)*F16:F19)/100
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
If you may please explain Why have you Entered 100 marked in Bold and italic ?
Because when column E is 0 you want to multiply by 1. Since everything is divided by 100 at the end of my formula I need 100 here so that at the end for any 0 rows the calculation will be 100/100 which is 1 as you want.


What would be appropriate Formula to get 677.10 if My Cell E19 Value will be always 500
because in Cell C20 i've incorporated as 822
What about this (still confirmed with Ctrl+Shift+Enter)
Excel Formula:
=(SUMPRODUCT(D16:D18*IF(E16:E18=0,100,E16:E18)*F16:F18)+D19*(C20-E19)*F19)/100
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,318
Members
453,032
Latest member
Pauh

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