ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   what row a value is in? (https://www.excelbanter.com/excel-programming/328921-what-row-value.html)

choice[_2_]

what row a value is in?
 
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

Ron Rosenfeld

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


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com