#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Offset 2nd ref.

A B
ONE 1
TWO 2
THREE 3
ONE 4


Is there a way I can use the offset to look up a duplicate reference? To
where I ref ONE and come up with 4.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Offset 2nd ref.

Try the below array formula which will lookup and return the 2nd matching value
=INDEX(B1:B10,SMALL(IF(A1:A10="One",ROW(A1:A10)),2 ))

With text 'One" in cell C1 and the instance number in cell D1
(array entered using Ctrl+Shift+Enter instead of Enter)
=INDEX(B1:B10,SMALL(IF(A1:A10=C1,ROW(A1:A10)),D1))

will return the last matching value in B if data is continuous (just works
for your sample).
=LOOKUP("one",A:A,B:B)
=VLOOKUP("one",A:B,2,1)

--
Jacob


"houAstros1989" wrote:

A B
ONE 1
TWO 2
THREE 3
ONE 4


Is there a way I can use the offset to look up a duplicate reference? To
where I ref ONE and come up with 4.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Offset 2nd ref.

Hi,

This array formula (Ctrl+Shift+Enter) will return the value against the last
occurrence of One. B10 contains One. I have assumed that the data is in
range B4:C7

=INDEX($B$4:$C$7,1*MAX(($B$4:$B$7=B10)*(ROW($B$4:$ B$7)-ROW($B$3))),2)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"houAstros1989" wrote in message
...
A B
ONE 1
TWO 2
THREE 3
ONE 4


Is there a way I can use the offset to look up a duplicate reference? To
where I ref ONE and come up with 4.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Offset 2nd ref.

Hi,

You may also try this non array formula

=LOOKUP(2,1/($B$4:$B$7=B10),C4:C7)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"houAstros1989" wrote in message
...
A B
ONE 1
TWO 2
THREE 3
ONE 4


Is there a way I can use the offset to look up a duplicate reference? To
where I ref ONE and come up with 4.


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
Offset Q Seanie Excel Worksheet Functions 6 January 16th 09 03:11 AM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Offset Eva Excel Worksheet Functions 1 January 30th 07 01:39 AM
OFFSET HELP Scott@CW Excel Worksheet Functions 1 December 21st 06 04:27 AM
Offset Brian Excel Worksheet Functions 6 April 7th 06 12:33 PM


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

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

About Us

"It's about Microsoft Excel"