Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Graham Tritton
 
Posts: n/a
Default vlookup to provide row reference instead of value

I am trying to get the row reference from a vlookup not the value.
A: B
Shop : sales

I have repeating records for 100 shops and I am trying to get the row
reference for the first & last record for each shop so that I can use it in a
TTEST function
  #2   Report Post  
JMB
 
Posts: n/a
Default

=MIN(IF(A1:A100=C1,ROW(A1:A100)))
=MAX((A1:A100=C1)*ROW(A1:A100))

where C1 contains the shop name you are trying to find.

these are array formulas and must be confirmed with Cntrl+Shift+Enter.


"Graham Tritton" wrote:

I am trying to get the row reference from a vlookup not the value.
A: B
Shop : sales

I have repeating records for 100 shops and I am trying to get the row
reference for the first & last record for each shop so that I can use it in a
TTEST function

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Some non-array alternatives:

First row:

=MATCH(C1,A1:A100,0)

Since Match returns the relative position you would have to make an
adjustment based on the actual starting cell of the data. If the data was in
the range A5:A100:

=MATCH(C1,A5:A100,0)+4

Last row:

=SUMPRODUCT(MAX((A1:A100=C1)*(ROW(A1:A100))))

Biff

"Graham Tritton" <Graham wrote in message
...
I am trying to get the row reference from a vlookup not the value.
A: B
Shop : sales

I have repeating records for 100 shops and I am trying to get the row
reference for the first & last record for each shop so that I can use it
in a
TTEST function



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
Vlookup will not reference a validation/drop down box Dave Excel Discussion (Misc queries) 2 August 19th 05 09:52 PM
Using a cell reference of a sheet in Vlookup crazybass2 Excel Worksheet Functions 3 August 12th 05 07:51 PM
Convert VLOOKUP to absolute cell reference Rich Excel Discussion (Misc queries) 2 August 6th 05 03:49 AM
Vlookup reference a worksheet Gary Brown Excel Worksheet Functions 1 May 20th 05 07:17 PM


All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"