How to easily apply conditional formatting to every 2nd column and specific rows

slam

Well-known Member
Joined
Sep 16, 2002
Messages
893
Office Version
  1. 365
  2. 2019
I have conditional formatting applied to E5:E200. I now need to apply it to the same rows in every second column G, I, K, M, and so on. I'm trying to do this with =MOD(COLUMN(),2)=0, but how do I fit the ROW range into this also?

Thanks!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
You would just include that in with your current Conditional Formatting formula:
Rich (BB code):
=AND(your current formula,MOD(COLUMN(),2)=0)
 
Upvote 0
Hi Joe,

I think I broke it :)

I went from this (working on column E)

Excel Formula:
=AND(NOT(ISBLANK(A5)),E5<>D5)

.... to this (now column E not working))

Excel Formula:
=AND(NOT(ISBLANK(A5)),E5<>D5,MOD(COLUMN(),2)=0)
 
Upvote 0
If you want columns E, G, I, K, M, then you actually want the odd numbered columns, not the even ones (sorry, I just copied your original formula and didn't notice that your logic was faulty).

So your formula should be:
Excel Formula:
=AND(NOT(ISBLANK(A5)),E5<>D5,MOD(COLUMN(),2)=1)

Or you could use the ISODD function, i.e.
Excel Formula:
=AND(NOT(ISBLANK(A5)),E5<>D5,ISODD(COLUMN()))
 
Upvote 1
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,221,442
Messages
6,159,905
Members
451,601
Latest member
terrynelson55

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