Excel 'end of month' datedif and Conditional formatting

jedwar

New Member
Joined
Jun 12, 2011
Messages
2
Help please!

I've created a spreadsheet with a cell containing today's date.

I then have another cell where I want a 'use-by-date' of a product (mm/yyyy)

1. I want to conditionally format the 'use-by-date' cell to highlight in yellow when its within so many days from today's date?


2. If the product is used (the mm/yyyy deleted) the cell will highlight in red until a replacement product's 'use by date' is entered.


I appreciate excel may cause me a few problems recognising the end-of-month date and hence I understand the zero of the month trick but I'm really head scratching on how to incorporate this into an entire formula for the cell.
confused.gif


Can anyone offer help or advice?

Thank you in advance :-) <!-- google_ad_section_end --><!-- / message -->
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Help please!

I've created a spreadsheet with a cell containing today's date.

I then have another cell where I want a 'use-by-date' of a product (mm/yyyy)

1. I want to conditionally format the 'use-by-date' cell to highlight in yellow when its within so many days from today's date?


2. If the product is used (the mm/yyyy deleted) the cell will highlight in red until a replacement product's 'use by date' is entered.


I appreciate excel may cause me a few problems recognising the end-of-month date and hence I understand the zero of the month trick but I'm really head scratching on how to incorporate this into an entire formula for the cell.
confused.gif


Can anyone offer help or advice?

Thank you in advance :-) <!-- google_ad_section_end --><!-- / message -->
A2:

=TODAY()

C2 houses a use-by-date value, which is a date.

Invoke the following formulas in conditional formatting, applied to C2...

Condition 1:

=$C2=""

Color formatting: Red

Condition 2:

=ISNUMBER($C2)*($C2-$A$2<=10)

Color formatting: Yellow

Adjust the cells to suit as well as 10 (the "so many days" value).
 
Upvote 0
Hi both

Thanks for the assistance.

I've got it working with a set date but if I enter 00/07/2011 it won't conditionally format at all.

1. I'm led to believe that excel will recognize 00//07/2011 as 30/06/2011?

The reasoning being that my use-by-dates are set as mm/yyyy and thus to avoid having to know the number of days in 08/2015, I would merely enter 00/09/2015.



2. I have approx 150 cells to conditionally format with end-of-month dates, do I have to conditionally format each individually or is there any tricks I can employ?

Regards

Jon
 
Upvote 0
Hi both

Thanks for the assistance.

I've got it working with a set date but if I enter 00/07/2011 it won't conditionally format at all.

1. I'm led to believe that excel will recognize 00//07/2011 as 30/06/2011?

If you type it yourself into a cell, Excel will take it as text, not as a number what a date is.

The reasoning being that my use-by-dates are set as mm/yyyy and thus to avoid having to know the number of days in 08/2015, I would merely enter 00/09/2015.[/quote]

A1: 8/1/2015

B1:

=EOMONTH(A1,0)


or

A1: 9/1/2015

B1:

=A1-1

might help.

2. I have approx 150 cells to conditionally format with end-of-month dates, do I have to conditionally format each individually or is there any tricks I can employ?

Regards

Jon

See above. This seems different from the task in your original post.
 
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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