Code to colour in cell when criteria not met

Dazzawm

Well-known Member
Joined
Jan 24, 2011
Messages
3,786
Office Version
  1. 365
Platform
  1. Windows
Hi, I need a code to look at the data in column AB and then look at column AC and colour in the cells if the criteria is not met.

Criteria:-

If AB has the data starting with A then the data in AC must also start with A, if the data in AB starts with either N or J then the data in AC must start with N and finally if the data in AB starts with V then the data in AC must start with S. So like I say if the criteria is not met then I would like the cells highlighted.

It has 35000 rows of data to look at so a code would be better than an If/And type formula. Thanks.
 
Your requests quoted in Post#7 say that for cells that do not meet your criteria you want them left alone and you want them highlighted, presumably at the same time.

Your latest post does not clarify.

So what's a contributor like me to do? Not worry about it, of course!
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I asked for the code to look at the data in AB and look for any cells that start with A, J, N & V then look to see if the adjacent cell in column AC meets the criteria set above if not highlight the cells, which it is doing - fine. I want the code to ignore any cells in column AB that start with any other data other than the 4 letters as above. I cant put it any clearer than that surely!
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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