View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default what row a value is in?

On Fri, 6 May 2005 18:44:06 -0700, choice
wrote:

in column A there are dates (not unique). basically all transaction of a
certain date, so the number of times a date will be there varies

How can i find what row the first instance of a given date appears
i will also need the last row that date appears
(2 seperate equations)

Thanks in advance


First Row:

=MATCH(GivenDate,A:A,0)

Last Row:

=MAX(($A$1:$A$1000=E1)*ROW(INDIRECT("1:1000")))

This second formula is an ARRAY formula so after typing it in, instead of
hitting <enter, hold down <ctrl<shift while hitting <enter. Excel will
place braces {...} around the formula.

Adjust the range in the second formula to fit your data, although the range can
include blanks to allow for expansion. You cannot, in an array formula,
specify an entire column.




--ron