Simple Conditional Formatting Question

arlene_fool

Board Regular
Joined
Feb 17, 2007
Messages
55
I need a conditional format that will light up a cell if there is supposed to be something there and there isnt.
A & B are start and end dates, C-J are months, i want a formula that will light up the cells under c-j if they are 0 but are between the start and end dates.

I can light them up if they are after the start date, and have a 0 value with this formula "=IF ($J1>0,(I F($J1<Sheet1!A$1,(I F(L1<1,TRUE,FALSE)),FALS E)),FALSE)"

but i need to it to stop after the end date, and i cant figure that out.

please help. thank you
Excel Workbook
ABCDEFGHIJ
1Rental Start DateRental End DateJanFebMarAprMayJunJulAug
21-May-1130-Aug-11$ 500.00$ 500.00$ 500.00$ 250.00
31-Mar11-Sep$ 500.00$ 500.00$ 500.00
Sheet1
Excel 2010
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Excel Workbook
ABCDEFGHIJKLMN
1Rental Start DateRental End DateJanFebMarAprMayJunJulAugSepOctNovDec
21-May-1130-Aug-11$500.00$500.00$500.00$250.00
31-Mar11-Sep$500.00$500.00$500.00
Sheet
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C21. / Formula is =AND(MONTH($A2)<=COLUMN()-2, MONTH($B2)>=COLUMN()-2,LEN(C2)=0)Abc
 
Upvote 0
that doesnt want to work...i think it might be cause of the len at the end. there are actually formulas in each of the blank cell, i didnt think they would make a difference so i didnt post it. sorry, please see below.
Excel Workbook
JKLMNOPQRSTU
2Rental Start DateRental End DateJanFebMarAprMayJunJulAugSepOct
31-May-1130-Aug-11$ -$ -$ -$ 500.00$ 500.00$ 500.00$ 500.00$ -$ -
41-Mar11-Sep$ -$ -$ -$ -$ 500.00$ 500.00$ 500.00$ 500.00$ -
Active
Excel 2010
Cell Formulas
RangeFormula
Q3=IF($J3<40725,(IF($K3>40694,P3,0)),0)
R3=IF($J3<40756,(IF($K3>40724,Q3,0)),0)
R4=IF($J4<40756,(IF($K4>40724,Q4,0)),0)
S3=IF($J3<40787,(IF($K3>40755,R3,0)),0)
S4=IF($J4<40787,(IF($K4>40755,R4,0)),0)
T3=IF($J3<40817,(IF($K3>40786,S3,0)),0)
T4=IF($J4<40817,(IF($K4>40786,S4,0)),0)
U3=IF($J3<40848,(IF($K3>40816,T3,0)),0)
U4=IF($J4<40848,(IF($K4>40816,T4,0)),0)
M3=IF($J3<40603,(IF($K3>40574,L3,0)),0)
M4=IF($J4<40603,(IF($K4>40574,L4,0)),0)
N3=IF($J3<40634,(IF($K3>40602,M3,0)),0)
N4=IF($J4<40634,(IF($K4>40602,M4,0)),0)
O3=IF($J3<40664,(IF($K3>40633,N3,0)),0)
O4=IF($J4<40664,(IF($K4>40633,N4,0)),0)
P4=IF($J4<40695,(IF($K4>40663,O4,0)),0)
 
Upvote 0
You could change the CF formula to this...
Formula is =AND(MONTH($A2)<=COLUMN()-2, MONTH($B2)>=COLUMN()-2,C2=0)

Also, the two in the formula is used to convert the column number to the Month number. In your original example, column C (column 3) is January. So COLUMN()-2 means Column(3)-2 = Month (1) or January.

In your most recent example, you have column L (column 12) as January. So you would need to change the 2s to 11s to make column 12 = Month(1) e.g.
Formula is =AND(MONTH($J2)<=COLUMN()-11, MONTH($K2)>=COLUMN()-11,C2=0)
 
Upvote 0
it lights up the whole area now...but i want it to not light up if there is a value there...
Excel Workbook
JKLMNOPQRST
2Rental Start DateRental End DateJanFebMarAprMayJunJulAugSep
31-May-1130-Aug-11$ -$ -$ -$ 500.00$ 500.00$ 500.00$ 500.00$ -
41-Mar11-Sep$ -$ -$ -$ -$ 500.00$ 500.00$ 500.00$ 500.00
5$ -$ -$ -$ -$ -$ -$ -$ -
Active
Excel 2010
Cell Formulas
RangeFormula
Q3=IF($J3<40725,(IF($K3>40694,P3,0)),0)
Q5=IF($J5<40725,(IF($K5>40694,P5,0)),0)
R3=IF($J3<40756,(IF($K3>40724,Q3,0)),0)
R4=IF($J4<40756,(IF($K4>40724,Q4,0)),0)
R5=IF($J5<40756,(IF($K5>40724,Q5,0)),0)
S3=IF($J3<40787,(IF($K3>40755,R3,0)),0)
S4=IF($J4<40787,(IF($K4>40755,R4,0)),0)
S5=IF($J5<40787,(IF($K5>40755,R5,0)),0)
T3=IF($J3<40817,(IF($K3>40786,S3,0)),0)
T4=IF($J4<40817,(IF($K4>40786,S4,0)),0)
T5=IF($J5<40817,(IF($K5>40786,S5,0)),0)
M3=IF($J3<40603,(IF($K3>40574,L3,0)),0)
M4=IF($J4<40603,(IF($K4>40574,L4,0)),0)
M5=IF($J5<40603,(IF($K5>40574,L5,0)),0)
N3=IF($J3<40634,(IF($K3>40602,M3,0)),0)
N4=IF($J4<40634,(IF($K4>40602,M4,0)),0)
N5=IF($J5<40634,(IF($K5>40602,M5,0)),0)
O3=IF($J3<40664,(IF($K3>40633,N3,0)),0)
O4=IF($J4<40664,(IF($K4>40633,N4,0)),0)
O5=IF($J5<40664,(IF($K5>40633,N5,0)),0)
P4=IF($J4<40695,(IF($K4>40663,O4,0)),0)
P5=IF($J5<40695,(IF($K5>40663,O5,0)),0)
 
Upvote 0
The CF formula in L3 should be this..
Formula is =AND(MONTH($J3)<=COLUMN()-11, MONTH($K3)>=COLUMN()-11,L3=0)
 
Upvote 0
that works...for 2011

unfortunatly that row continues on for 3 years...html maker only allowed me to post 13 columns though...
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,919
Members
452,949
Latest member
beartooth91

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