# IF(DATE)

#### srizki

##### Well-known Member
I created a small sales tax form that has discount and penalty calcuation, I want it to calculate automatically. I want a formula that should calculate, "if today is 20th or before the 20th of the month, give disount, 0.005", or leave blank
in penalty cell, "if today is after 20th add 0.05 to the total tax".

Thanks

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I'm a little confused about the give .005 or leave blank part. What determines whether you should leave it blank or give the discount? Anyway, for starters:-

=IF(DAY(TODAY())<=20,0.005,0.05)
or let's say cell A1 holds your tax:-

=IF(DAY(TODAY())<=20,A1*0.005,(0.05*A1)+A1)

Also, is .005 a percent? i will assume it is...
=IF(DAY(TODAY())<=20,A1-(A1*0.005),(0.05*A1)+A1)

That is excellent, that is exactly what I wanted, second and third formula. The third one gives final figure, so I think I will use the second one to show actual discount or penalty, and then deduct it from the tax.

Thank you very much Todd.

Replies
3
Views
302
Replies
0
Views
166
Replies
5
Views
206
Replies
6
Views
535
Replies
3
Views
205

1,203,485
Messages
6,055,686
Members
444,807
Latest member
RustyExcel

### 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.

### Which adblocker are you using?

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

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