Issue checking to see if cell is 0?

Tap13

New Member
Joined
Apr 13, 2010
Messages
35
I have 5 columns: Cost, Commission, Discount Percent, Amount Paid, Amount Saved. The first 3 listed are literal values, the last two are formulas. I want my Amount Paid to come from an if statement that checks if discount percent was 0 then they paid full price, but if discount percent was not 0 then they paid Cost - (Cost*Discount). The formula compares 0% in the discount column against "0" and will not ever say that they are the same (this also goes if I compare discount cell against "0%". What am I doing wrong?

Excel Workbook
FGHIJ
1CostCommissionDiscount PercentAmount PaidAmount Saved
2$ 85.00$ 28.050%$ -$ 85.00
2010 Treatment Data
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If
F2: 100
H2: 10%
I2 would be 10% off of 100...or 90
and
J2 would be a savings of 10

It seems like these formulas would work for you:
Code:
I2: =F2*(1-H2)
J2: =+F2-I2
Does that help? or am I missing something?
 
Last edited:
Upvote 0
Does correcting your formula do what you need?

=IF(H2=0,F2,F2*H2)

=IF(H2=0,0,(F2-(F2*H2)))

0 is a number "0" is text.
 
Upvote 0
Does correcting your formula do what you need?

=IF(H2=0,F2,F2*H2)

=IF(H2=0,0,(F2-(F2*H2)))

0 is a number "0" is text.

That is what I was doing wrong, I didn't realize quotes made it compare for text and not a number. Getting rid of the quotes made everything work perfectly. Thank you for your guys help.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

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