Highlights two cells that in sequence

RichTom44

New Member
Joined
Oct 23, 2023
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

How can I able to highlight the entire column where numbers are not in sequence? There are two cells that are in sequence and I want to highlight the one cell that is out of sequence. Thanks

OUT EIR
13079
13080
15111
15112
13150
13151
13192
13193
13138
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Welcome to the MrExcel board!

How can I able to highlight the entire column

I want to highlight the one cell that is out of sequence.
The above two requests seem contradictory. One asks to highlight an entire column. The other asks to highlight one cell.

In your sample it seems that you want to highlight the last entry. Is that the case?
If so, why highlight that value when 13150 also seems to be out of sequence?

Please explain better in words exactly what you are trying to achieve.
 
Upvote 0
Welcome to the MrExcel board!




The above two requests seem contradictory. One asks to highlight an entire column. The other asks to highlight one cell.

In your sample it seems that you want to highlight the last entry. Is that the case?
If so, why highlight that value when 13150 also seems to be out of sequence?

Please explain better in words exactly what you are trying to achieve.
Hi, Thanks for the reply. I want only to highlight the last entry. As you can see in the sample every two cells are in consecutive order and I want to highlight the one cell that has no other pair of consecutive numbers.
 
Upvote 0
Thanks for the further detail. Does this do what you want?

23 10 23.xlsm
A
1OUT EIR
213079
313080
415111
515112
613150
713151
813192
913193
1013138
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A10Expression=AND(A2<>N(A1)+1,A2<>A3-1)textNO
 
Upvote 0
Thanks for the further detail. Does this do what you want?

23 10 23.xlsm
A
1OUT EIR
213079
313080
415111
515112
613150
713151
813192
913193
1013138
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A10Expression=AND(A2<>N(A1)+1,A2<>A3-1)textNO
Yes, it perfectly works. Thank you very much...
 
Upvote 0

Forum statistics

Threads
1,223,966
Messages
6,175,662
Members
452,666
Latest member
AllexDee

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