Display row numbers of a range

C

Cap

I'd like to be able return the the row numbers (started at
row - ends at row) from a list of names that are in D2 to
the end possibly. The list will always be sorted!

(E.g. In B2 I'd like to type in Joe; and in Column D Joe
is found starting at row 371 and the last row with Joe is
806. It does not matter if two cells are needed to show
the two numbers.)

I'm not sure how to do this!

TIA
 
J

Jason Morin

First row (formula in J1):

=MATCH(B1,D:D,0)

Last row:

K1: =J1+COUNTIF(D:D,B1)-1

HTH
Jason
Atlanta, GA
 
P

Peo Sjoblom

One way

this will give you the cell address of the first and the last

first

=CELL("address",INDEX(D2:D10000,MATCH(B2,D2:D10000,0)))

last


=CELL("address",INDEX(D1:D10000,MAX((D2:D10000=B2)*(ROW(D2:D10000)))))

the latter entered with ctrl + shift & enter
also note that for the latter regardless where the data starts index needs
to start in row 1 (D1) or else you have to offset the number of rows where
the data starts




Regards,


Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top