Ifs and End of months

ylwcat11

New Member
Joined
May 1, 2009
Messages
1
I need help writing a formula... Here is the situation....

If the item was purchased through "X" then the fixing date needs to be 3 days before the end of the month.

If the item was purchased through "Y" then the fixing date needs to be the last day of the month..

Now for both ifs, I need to compare the fixing date to the end date and make sure the above is true...

Can anyone help?

Thanks!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
"Now for both ifs, I need to compare the fixing date to the end date and make sure the above is true..."

huh?

If cell D10 contains the date in question, you can get the last day of the month like so..

=DATE(YEAR(D10),MONTH(D10)+1,DAY(D10)-DAY(D10))
 
Upvote 0
Hello ylwcat11, welcome to MrExcel

If you have the "fixing date" in A1 end of month in B1 and "X" or "Y" in C1

=B1-A1=IF(C1="X",3,0)

Then that will give TRUE or FALSE depending on whether the dates are right given the value in C1. Is that what you need?
 
Upvote 0

Forum statistics

Threads
1,215,518
Messages
6,125,293
Members
449,218
Latest member
Excel Master

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