Conditional formatting won't work - what am I doing wrong?

sandwichgirl

New Member
Joined
Aug 13, 2007
Messages
31
Office Version
  1. 365
Platform
  1. Windows
Hello

I am trying to conditionally format cells based on a date comparison between 2 other cells and I cannot get it to work using what I've found on on CF tutorials but am not sure what I am doing wrong.

I want to colour in I2 with green if I1 is less than E2, or colour it yellow if I2 is greater than G2 - I want to do this for each column using the date in the header relative to the cell in column E.

1633424669274.png


to look like this and I can show out of stock weeks by colour:

1633424916310.png


My only theory at the moment as to why it won't work is because the comparison cells are not on the same row but spent ages trying to figure it out so any help would be appreciated please?

Thank you
 

Attachments

  • 1633424885182.png
    1633424885182.png
    28.1 KB · Views: 4

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What formula did you use? you need to be referring to $E2 to lock just the column and I$1 to lock just the row, so that each will adjust as for the relevant row/column.
 
Upvote 0
Hi

I selected cell I2 and the CF formula was =I$1<=$E2 which should turn the cell green based on I2 saying 3/10 and E2 being 26/10.

I've played around a bit more and I think it is something to do with the format of I1 as I ran it in a another cell and it worked. The values in row I1 are a formula referencing to another sheet and are formatted as a date - if I overtype with the same date the CF works, visually the cell content looks the same but something is different. It appears the cell with the source date whilst looking like and formatted as a date isn't behaving like a date, so the CF won't work. Fun times.

I am going to see whether I can do something about the source data, so another problem altogether.

thanks for your help
 

Attachments

  • 1633429660076.png
    1633429660076.png
    36.7 KB · Views: 6
  • 1633429892559.png
    1633429892559.png
    32.8 KB · Views: 7
Upvote 0
Try adding
Excel Formula:
+0
to the end of the formulas in row 1?
 
Upvote 0
Try adding
Excel Formula:
+0
to the end of the formulas in row 1?
That formula is ='Call Off + FC Sheet'!BE8+0 and turned all my data to N/A. I went into the source and overtyped the date and it returned data.
The source is a system raised doc and no matter how I format those cells (£,% etc), they stay looking like a date - so looks like overtyping and autofill is what I'll need to do.

thanks
 
Upvote 0
Adding 0 should never produce a #N/A error in those cells
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,580
Members
449,039
Latest member
Arbind kumar

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