Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
I have a sheet with numbers in three columns.
I would like to have a formula or function to look across the row and tell me if there is a consecutive number. In other words: A B C D 3 4 1 34 In column D, I'd like display the results 34 if there are consecutive numbers. Thanks in advance. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
One way:
D1: =IF(B1=A1+1,A1&B1&IF(C1=B1+1,C1,""),IF(C1=B1+1,B1& C1,"")) In article . com, Tmaxx02 wrote: I have a sheet with numbers in three columns. I would like to have a formula or function to look across the row and tell me if there is a consecutive number. In other words: A B C D 3 4 1 34 In column D, I'd like display the results 34 if there are consecutive numbers. Thanks in advance. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
Assuming your numbers are in row 1, try this in D1:
=IF(B1=A1+1,A1&B1,IF(C1=B1+1,B1&C1,"")) Note that this returns a text answer - if you had 10 in one cell and 11 next to it you would get 1011. Hope this helps. Pete On Jun 8, 10:40 pm, Tmaxx02 wrote: I have a sheet with numbers in three columns. I would like to have a formula or function to look across the row and tell me if there is a consecutive number. In other words: A B C D 3 4 1 34 In column D, I'd like display the results 34 if there are consecutive numbers. Thanks in advance. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
Both of these work with this exception: if 4 is before the 3, it
returns a blank. I think that I could probably work this out though. Thanks very much, I appreciate it. Terry |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
This accounts for both ascending and descending values:
A B C D 3 4 1 34 4 3 1 43 =IF(ABS(A1-B1)=1,A1&B1&IF(ABS(B1-C1)=1,C1,""),IF(ABS(B1-C1)=1,B1&C1,"")) Biff "Tmaxx02" wrote in message ups.com... I have a sheet with numbers in three columns. I would like to have a formula or function to look across the row and tell me if there is a consecutive number. In other words: A B C D 3 4 1 34 In column D, I'd like display the results 34 if there are consecutive numbers. Thanks in advance. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
On Jun 8, 4:36 pm, "T. Valko" wrote:
This accounts for both ascending and descending values: A B C D 3 4 1 34 4 3 1 43 =IF(ABS(A1-B1)=1,A1&B1&IF(ABS(B1-C1)=1,C1,""),IF(ABS(B1-C1)=1,B1&C1,"")) Biff "Tmaxx02" wrote in message ups.com... I have a sheet with numbers in three columns. That worked great. It also accounted for more than 2 numbers. Thanks very much. Terry I would like to have a formula or function to look across the row and tell me if there is a consecutive number. In other words: A B C D 3 4 1 34 In column D, I'd like display the results 34 if there are consecutive numbers. Thanks in advance.- Hide quoted text - - Show quoted text - |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
Note the result if the values are negative:
A B C D -3 -4 1 -3-4 Biff "T. Valko" wrote in message ... This accounts for both ascending and descending values: A B C D 3 4 1 34 4 3 1 43 =IF(ABS(A1-B1)=1,A1&B1&IF(ABS(B1-C1)=1,C1,""),IF(ABS(B1-C1)=1,B1&C1,"")) Biff "Tmaxx02" wrote in message ups.com... I have a sheet with numbers in three columns. I would like to have a formula or function to look across the row and tell me if there is a consecutive number. In other words: A B C D 3 4 1 34 In column D, I'd like display the results 34 if there are consecutive numbers. Thanks in advance. |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I do this?
"Tmaxx02" wrote in message oups.com... On Jun 8, 4:36 pm, "T. Valko" wrote: This accounts for both ascending and descending values: A B C D 3 4 1 34 4 3 1 43 =IF(ABS(A1-B1)=1,A1&B1&IF(ABS(B1-C1)=1,C1,""),IF(ABS(B1-C1)=1,B1&C1,"")) Biff "Tmaxx02" wrote in message ups.com... I have a sheet with numbers in three columns. That worked great. It also accounted for more than 2 numbers. Thanks very much. Terry You're welcome. Thanks for the feedback! Biff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|