How to high-light consecutive numbers in cells

AMANZ

New Member
Joined
Aug 26, 2008
Messages
5
I have a series of numbers in 10 columns. Would like to highlight cells that have consecutive numbers even if the numbers are not in adjacent columns.

For example, numbers 8 & 7 and 1 & 2 should be high-lighted

A B C D E F G H I J
4 8 2 10 7 1 12 20 30 15

Any suggestions?
Thanks!
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Assuming that the listin is in a1 to j10, thy the following formula as a conditional foramt in a1 and copying the format to the whole of the range.

=OR(NOT(ISNA(MATCH(A1+1,$A$1:$J$1,0))),NOT(ISNA(MATCH(A1-1,$A$1:$J$1,0))))

Remember to set the highlight type when you enter the conditional format.
 
Upvote 0
Maybe this?

Excel Workbook
ABCDEFGHIJ
1482107112203015
271238573328221717
310443124640425638
41545746331640393646
53455023262923301411
62115231754312151935
747481229342335154946
825125337473545507
989725613410
10231344359481139501
Consecutive Numbers
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A11. / Formula is =ISNUMBER(MATCH(1,ABS($A1:$J1-A1),0))Abc
 
Upvote 0

Forum statistics

Threads
1,215,553
Messages
6,125,483
Members
449,233
Latest member
Deardevil

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