View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default 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.