Conditional Formatting

frustrated_macro

New Member
Joined
Sep 4, 2019
Messages
49
Office Version
  1. 365
Platform
  1. Windows
Hi
I have dates in two diff columns, and need to highlight when the date in J is bigger than the one in D, of that same row
And i can get the conditional formatting to work on that one row, but how do i apply it to allll rows of the document, so that its alwasys looking at the matching row
so like J22 and D22 are compared and not D22 vs J12
The second picture is whats happening when i try to apply it to the whole column

1710336058607.png
1710336097598.png
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Select JUST the range you want to apply the Conditional Formatting to, i.e. J3:J100 or whatever row you want to go down to.

Then, write the Conditional Formatting formula as it applies to the FIRST cell in that range, and it will adjust it for the others, i.e.
Excel Formula:
=AND(J3>D3,J3>0,D3>0)
and choose your desired formatting option.
 
Upvote 0
Solution
Select JUST the range you want to apply the Conditional Formatting to, i.e. J3:J100 or whatever row you want to go down to.

Then, write the Conditional Formatting formula as it applies to the FIRST cell in that range, and it will adjust it for the others, i.e.
Excel Formula:
=AND(J3>D3,J3>0,D3>0)
and choose your desired formatting option.
perfect! thank you lots!
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0
okay, new issue
i need to create a macro that basically does this kind of conditional formatting

1711118227441.png



the range will be G2:G & LAstRow, which has already been defined, the range in the screenshot was just me testing that all the colors worked
but i have no idea how to write that into the macro. i had a very sad attempt at an IF loop, but im not sure how to properly write the formula AND the formatting into the loop.
 
Upvote 0
okay, new issue
i need to create a macro that basically does this kind of conditional formatting

View attachment 108834


the range will be G2:G & LAstRow, which has already been defined, the range in the screenshot was just me testing that all the colors worked
but i have no idea how to write that into the macro. i had a very sad attempt at an IF loop, but im not sure how to properly write the formula AND the formatting into the loop.
As that is an entirely new question with new requirements (looking for VBA code instead of Conditional Formatting), you should post it to a brand new question so it appears in the "Unanswered threads" listing.
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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