Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number Sequence
I would like to obtain numbers that are in sequence in a six column ranges.
Selecting across Columns only not rows. Such as, A1.. F2 A B C D E F 1 1 12 33 9 10 44 2 0 3 4 13 94 15 9 & 10 are in sequence across columns So are 3 & 4 in sequence. Once the sequence has been identified, 9 & 10; 3 & 4, they would be highlited by a color such as grey, Any suggestions would be appreciated. With Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number Sequence
this worked for me:
Dim x As Range With Sheets("Sheet1") Set x = .Range(.Range("A1"), .Range("F2")) End With For Each c In x If c.Value = (c.Offset(0, 1).Value - 1) Then Range(c, c.Offset(0, 1)).Select With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With End If Next "smandula" wrote: I would like to obtain numbers that are in sequence in a six column ranges. Selecting across Columns only not rows. Such as, A1.. F2 A B C D E F 1 1 12 33 9 10 44 2 0 3 4 13 94 15 9 & 10 are in sequence across columns So are 3 & 4 in sequence. Once the sequence has been identified, 9 & 10; 3 & 4, they would be highlited by a color such as grey, Any suggestions would be appreciated. With Thanks in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number Sequence
Using Conditional Formatting and your example...
Highlight Rows 1 and 2. FORMAT / CONDITIONAL FORMATTING... Condition 1: Formula is =A1=IV1+1 Select the format desired ADD Condition 2: Formula is =A1=B1-1 Select the format desired HTH, -- Gary Brown "smandula" wrote: I would like to obtain numbers that are in sequence in a six column ranges. Selecting across Columns only not rows. Such as, A1.. F2 A B C D E F 1 1 12 33 9 10 44 2 0 3 4 13 94 15 9 & 10 are in sequence across columns So are 3 & 4 in sequence. Once the sequence has been identified, 9 & 10; 3 & 4, they would be highlited by a color such as grey, Any suggestions would be appreciated. With Thanks in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number Sequence
One way:
Select Column A. Enter the following CF: CF1: Formula is =B1-A1=1 Format1: Grey Select Column F. Enter this CF: CF1: Formula is =F1-E1=1 Format1 Grey Select columns B:E, apply these CF: CF1: Formula is =C1-B1=1 Format1: Grey CF2: Formula Is =D1-C1=1 Format2: Grey In article , "smandula" wrote: I would like to obtain numbers that are in sequence in a six column ranges. Selecting across Columns only not rows. Such as, A1.. F2 A B C D E F 1 1 12 33 9 10 44 2 0 3 4 13 94 15 9 & 10 are in sequence across columns So are 3 & 4 in sequence. Once the sequence has been identified, 9 & 10; 3 & 4, they would be highlited by a color such as grey, Any suggestions would be appreciated. With Thanks in advance |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number Sequence
Thanks very much for the solutions.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looking for next number in sequence | Excel Discussion (Misc queries) | |||
Row Number out of Sequence | Excel Discussion (Misc queries) | |||
How can I match a random number with closest number from sequence? | Excel Worksheet Functions | |||
Number sequence | Excel Discussion (Misc queries) | |||
Next Number in Sequence | Excel Programming |