Help Please, For New Cattle Management System

Harrywatson

Board Regular
Joined
Jan 20, 2014
Messages
92
In column B I have numerous dates down the column displayed as --/--/----.

In column D I then have the ages relative to the dates in column B using the formula:

=DATEDIF(B1,NOW(),"m") &" months, " & DATEDIF(B1,NOW(),"md") &" days "

So I know have ages in column D such as '23 months 7 days' or '13 months 22 days'.

What I would like to know please is how to format the cells so that when there is an age that is under 16 months but over 11 months. The cell then becomes highlighted.

Eg. 12 months 4 days would be highlighted. 15 months 15 days would be a highlighted cell. 16 months 2 days wouldn't be a highlighted cell. Neither would be 10 months 6 days.

The answer to this would be greatly appreciated thanks;) Please ask questions if you need any more details. Thanks so much:biggrin:
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
You could use

=(EDATE(B2, 11) < TODAY()) * (EDATE(B2, 16) > TODAY())

as a conditional formatting formula to highlight the cell.
 
Upvote 0
Excel Workbook
ABCDE
1AnimalDOBAge in months
2Jan 01, 20140.70 months, 21 days0
3Aug 05, 20135.65 months, 17 days5
4Feb 26, 201310.910 months, 27 days10
5Jan 17, 201312.212 months, 5 days12
6Nov 18, 201214.214 months, 4 days14
7Sep 19, 201216.216 months, 3 days16
1b
Excel 2003
Cell Formulas
RangeFormula
C2=($G$1-B2)/30.25
C3=($G$1-B3)/30.25
C4=($G$1-B4)/30.25
C5=($G$1-B5)/30.25
C6=($G$1-B6)/30.25
C7=($G$1-B7)/30.25
D2=DATEDIF(B2,TODAY(),"m") &" months, " & DATEDIF(B2,TODAY(),"md") &" days "
D3=DATEDIF(B3,TODAY(),"m") &" months, " & DATEDIF(B3,TODAY(),"md") &" days "
D4=DATEDIF(B4,TODAY(),"m") &" months, " & DATEDIF(B4,TODAY(),"md") &" days "
D5=DATEDIF(B5,TODAY(),"m") &" months, " & DATEDIF(B5,TODAY(),"md") &" days "
D6=DATEDIF(B6,TODAY(),"m") &" months, " & DATEDIF(B6,TODAY(),"md") &" days "
D7=DATEDIF(B7,TODAY(),"m") &" months, " & DATEDIF(B7,TODAY(),"md") &" days "
E2=DATEDIF(B2,TODAY(),"m")+0
E3=DATEDIF(B3,TODAY(),"m")+0
E4=DATEDIF(B4,TODAY(),"m")+0
E5=DATEDIF(B5,TODAY(),"m")+0
E6=DATEDIF(B6,TODAY(),"m")+0
E7=DATEDIF(B7,TODAY(),"m")+0


Your question is similar to your previous questions.

You could refer to the numbers in Column C or E for the Excel Conditional Format's formula criteria.
N.B. Column D is Text.
 
Upvote 0
Thanks, I only realised after I had posted this that someone had replied to my other question with a formula that I understood, I used yours also and they both work great thanks a lot ☺️
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,051
Members
452,542
Latest member
Bricklin

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