Conditional formatting is not quite right

C with no eyes

Board Regular
Joined
Nov 26, 2016
Messages
151
period fromperiod todate postedbreakdown totalNov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19
17/10/1816/10/2001/11/18 £ 9.99 £ 0.41 £ 0.41 £ 0.41 £ 0.41 £ 0.41 £ 0.41 £ 0.41
19/11/1816/12/1814/12/18 £ 2,400.00 £ 1,200.00 £ 1,200.00
17/12/1811/01/1910/01/19 £ 2,400.00 £ 1,200.00 £ 1,200.00
01/01/1931/12/1931/12/19 £ 90.75 £ 7.57 £ 7.57 £ 7.57 £ 7.56 £ 7.56
23/10/1822/10/1901/11/18 £ 739.00 £ 61.59 £ 61.59 £ 61.59 £ 61.59 £ 61.58 £ 61.58 £ 61.58
01/02/1928/02/1920/01/19 £ 280.00 £ 280.00
01/11/1831/10/1921/11/18 £ 750.00 £ 62.50 £ 62.50 £ 62.50 £ 62.50 £ 62.50 £ 62.50 £ 62.50
01/11/1831/10/1921/11/18 £ 11,580.00 £ 965.00 £ 965.00 £ 965.00 £ 965.00 £ 965.00 £ 965.00 £ 965.00
01/11/1831/10/1921/11/18 £ 616.50 £ 51.37 £ 51.37 £ 51.37 £ 51.37 £ 51.37 £ 51.37 £ 51.38
01/11/1831/12/1814/01/19 £ 56.66 £ 28.33 £ 28.33
01/11/1831/12/1814/01/19 £ 1,352.34 £ 676.17 £ 676.17
01/11/1831/12/1814/01/19 £ 186.76 £ 93.38 £ 93.38
01/11/1831/12/1814/01/19 £ 85.86 £ 42.93 £ 42.93
03/11/1821/12/1822/01/19 £ 1,230.38 £ 505.75 £ 724.63
01/11/1829/11/1822/01/19 £ 64.05 £ 64.05
06/12/1828/12/1822/01/19 £ 51.24 £ 51.24

<tbody>
</tbody>


Above is a snippet of some info that starts at column D.

I have applied the following conditional formatting to =$H:$AE

=AND(MONTH(H$1)>=MONTH($D1),YEAR(H$1)>=YEAR($D1),MONTH(H$1)<=MONTH($E1),YEAR(H$1)<=YEAR($E1))

I want it to highlight cells that relate to the period dates i.e. the first row should be highlighted from Oct18 to Oct20. The second row should be highlighted from Nov18 to Dec18.

It's working on most rows but not all. What am I missing?

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
=AND(EOMONTH(H$1,-1)+1>=EOMONTH($D1,-1)+1,EOMONTH(H$1,0)<=EOMONTH($E1,0))
 
Upvote 0
That works beautifully, thank you very much. Still can't see what was wrong with mine though and it's going to bug me until I know why!!
 
Upvote 0
When looking at row2 part of your formula is
MONTH(H$1)<=MONTH($E2)
This returns FALSE as Nov is not <= Oct
 
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,308
Members
448,886
Latest member
GBCTeacher

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