Search column for cell with specific formatting.

JohnZ1156

Board Regular
Joined
Apr 10, 2021
Messages
157
Office Version
  1. 2021
Platform
  1. Windows
I have a column with consecutive numbers. I used “Conditional Formatting” to format a cell if there is a number that is not consecutive in the column.

This is my Conditional Formatting rule description: =AND(A18<>A17+1, A19<>A18+1).
It changes the format to fill “Red, Accent 2, Lighter 40%”.
Right now, I have to scan down 7000+ rows to check to see if there is a number in a cell that is not consecutive by looking for the format changed cell..

Question:
Is there a formula that I can place in a cell outside this column that will tell me if a cell within the column has this “Red, Accent 2, Lighter 40%” format,
and better yet, which row the non-consecutive cell is in?
A formula that constantly looks in the column would be better than VBA, but I can use all the help I can get.

Thank you.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
in a new column put the formula that you have used for conditional formatting
=AND(A18<>A17+1, A19<>A18+1)

copy down the list - if in a column next to the data - double click on the black cross bottom right of cell and it will autofill

then you will get TRUE / FALSE

then use filter on TRUE - then you will see all the conditional formatted cells
 
Upvote 0
Thank you,
I thought of that. Requires inserting a column, entering formula, copying down, using Filter.
I would rather not have to go through all those steps, you see and I really don't want the inserted column permanently in my table.
 
Upvote 0
oh ok
Is there a formula that I can place in a cell outside this column

i thought you wanted a formula in a new column

and better yet, which row the non-consecutive cell is in?

will there only be 1 ? ever out of the 7000 that is wrong - or multiple cells

A formula that constantly looks in the column would be better than VBA, b

i think i need to see examples of what you want

ALSO what version of excel are you using - the profile says 2010

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
Sorry, I'll update my profile.
MS Excel 2021 (Office Pro 2021)
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

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