Late fee IF 30 days LESS than two different dates

MarieEx

New Member
Joined
Jun 5, 2019
Messages
8
h
Good day to you all,

I need help. I am trying to create a column for late fees, if either Registration Date (C) or RX received (D) are LESS than 30 days from Camp Start date (I). Basically if we receive either the registration or the Rx less than 30 days from camp session start date I have to charge a late fee.

So far this is what I can come up with, but the info that is giving me is incorrect.

=IF(OR(A2<=(E2-30),B2<=(E2-30)),"$10.00","")
h

Thanks in advance
Registration DateRX Received DateLate FeeOTC/RXCamp Session Start DateCamp NameDurationSIB
05/29/1906/01/19?OTC06/16/19ABC14Y
04/15/1905/09/19?RX06/16/19ABC28Y
05/01/1905/09/19?RX06/16/19ABC17N
06/01/1906/04/19?RX06/16/19ABC10Y

<tbody>
</tbody>
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the Board!

Try this:
Code:
[COLOR=#333333]=IF(OR(E2-A2<=30,E2-B2<=30),10,"")[/COLOR]
Also, if you want to do math on the values you are returning, return the number 10, not the text value "$10.00" (anything between double-quotes is treated as literal text)
To get the dollar sign and decimals, simply apply cell formatting to that cell.
 
Last edited:
Upvote 0
Welcome to the Board!

Try this:
Code:
[COLOR=#333333]=IF(OR(E2-A2<=30,E2-B2<=30),10,"")[/COLOR]
Also, if you want to do math on the values you are returning, return the number 10, not the text value "$10.00" (anything between double-quotes is treated as literal text)
To get the dollar sign and decimals, simply apply cell formatting to that cell.



--- Thank you for your reply but it did not work :( I gives me a 10 on every single line, which I know is not correct.
 
Upvote 0
In your example, the first and the fourth record return 10 for me, while the other two do not.

If you don't see the same thing, you may have a data issue. Are A2, B2, and E2 really entered as dates, or text?
What do these formulas return?
=ISNUMBER(A2)
=ISNUMBER(B2)
=ISNUMBER(E2)
 
Last edited:
Upvote 0
Check the following:
- You typed in the formula correctly
- Your formula is referencing the correct columns
- Your formula is referencing the correct row

After you verify that, if you still feel it is not working properly, then provide me with an example that is not working.
 
Upvote 0
All three items you asked are correct. Bellow is a copy/paste of the actual sheet. As you can see there is a 10 on all lines. The 04/15/19 Registrations shouldn't have the 10 because the camp session starts 06/18/19, and we received registration on 04/15 and Rxs on 04/18... well before the 30 day window (which would be 05/18/19). Thank you so much for all your help.


Reg Date Rxs Rec Datelate fee# of rxs neededOTC or RxCamp Session NameCamp Session Start Date
5/29/20195/31/2019$10.001RxFull Session6/16/2019
5/29/20195/31/2019$10.001RxFull Session6/16/2019
5/29/20195/31/2019$10.001OTCFull Session6/16/2019
5/29/20195/31/2019$10.001OTCFull Session6/16/2019
5/29/20195/31/2019$10.001OTCFull Session6/16/2019
5/29/20195/31/2019$10.001OTCFull Session6/16/2019
4/15/20194/18/2019$10.001OTCSession 16/18/2019
4/15/20194/18/2019$10.001RxSession 16/18/2019
5/17/20195/15/2019$10.001OTCSession 16/18/2019
4/26/20195/13/2019$10.001RxSession 16/18/2019
4/26/20195/13/2019$10.001RxSession 16/18/2019
3/12/20195/6/2019$10.001RxSession 16/18/2019

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Check the following:
- You typed in the formula correctly
- Your formula is referencing the correct columns
- Your formula is referencing the correct row

After you verify that, if you still feel it is not working properly, then provide me with an example that is not working.

___________________________________________________________________________

Following please my actual columns. The Late Fee column is filled in with your formula.


Reg DATEAll Rxs Rec DATELATE FEESessionCamp Session Start Date
6/1/2019N#VALUE!A 6/5/2019
6/1/2019N#VALUE!A 6/5/2019
5/29/20195/31/201910A 6/16/2019
5/31/201910A 6/16/2019
5/29/20195/31/201910A 6/16/2019
5/29/20195/31/201910A 6/16/2019
5/29/20195/31/201910A 6/16/2019
5/29/20195/31/201910A 6/16/2019
4/15/20194/18/201910A 6/18/2019
4/15/20194/18/201910A 6/18/2019
5/17/20195/15/201910A 6/18/2019
4/26/20195/13/201910A 6/18/2019
4/26/20195/13/201910A 6/18/2019
3/12/20195/6/201910A 6/18/2019
YESYES#VALUE!A 6/18/2019
4/15/20194/18/201910A 6/18/2019

<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
All three items you asked are correct. Bellow is a copy/paste of the actual sheet. As you can see there is a 10 on all lines. The 04/15/19 Registrations shouldn't have the 10 because the camp session starts 06/18/19, and we received registration on 04/15 and Rxs on 04/18... well before the 30 day window (which would be 05/18/19).
OK, in the previous email, I mentioned:
Check the following:
- You typed in the formula correctly
- Your formula is referencing the correct columns
- Your formula is referencing the correct row
In your data example, you have 2 extra columns, so the Start Date is NOT in column E, but looks like it is in column G. So you would need to adjust the formula (since the format is not the same as your original).
That formula would look like:
Code:
=IF(OR([COLOR=#ff0000]G2[/COLOR]-A2<=30,[COLOR=#ff0000]G2[/COLOR]-B2<=30),10,"")
(assuming that you do not have any other extra columns).

If you do that, then it shows the first 6 records as having a late fee, and the last 6 records not having a late fee, which seems correct, according to your rules.
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

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