View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default How to find the first row not equal to the value in the first row?

=INDEX(A2:A30000,MATCH(TRUE,A2:A30000<A2,0))

entered with ctrl + shift & enter


will return the contents of the first row in A2:A3000 not equal to A2



--


Regards,


Peo Sjoblom





"INTP56" wrote in message
...
Excel 2003

I often get data files from instruments where many initial rows all have
the
same value, typically zero, but not limited to that. Often these files are
text files with 100+ columns.

For example, I might have a file with 30,000 rows in it, but some columns
don't start having data till row 20,000 or so.

What I would like is a worksheet function where I could give it a range,
and
it return the first cell (Index or value) that is not equal to the value
in
the first data row.

I'd like to do this without creating extra columns, or having to manually
iterate through thousands of cells for 100+ columns. Functionally, I would
type a formula into a cell above the first column in question, then drag
it
across all the other columns so each column would have it's own individual
value for the first different value.

The icing on the cake would be to do the same thing, except this time look
from the bottom up.

Is this possible?

Thanks, Bob