Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Smugga
 
Posts: n/a
Default lookup latest entered match

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB
 
Posts: n/a
Default lookup latest entered match

One way (array entered, must confirm w/Control+Shift+Enter)

=INDEX(C1:C6,LARGE((A1:A6="fred")*ROW(INDIRECT("1: "&ROWS(A1:A6))),1))

If you have more than two matches and want to return one in between,
changing the 1 at the end (second argument of the LARGE function) to 2 will
return the second to last, etc. You can also change LARGE to SMALL (it works
the same way, but will start counting from the beginning of your data).


"Smugga" wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default lookup latest entered match

Assuming that A2:C7 contains the data, try...

=LOOKUP(2,1/(A2:A7="Fred"),C2:C7)

Hope this helps!

In article ,
Smugga wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Smugga
 
Posts: n/a
Default lookup latest entered match

It almost answers the question. I would like the date returned, and not
Fred... What I am searching for is the last time (date) that Fred was entered.
-G

"Domenic" wrote:

Assuming that A2:C7 contains the data, try...

=LOOKUP(2,1/(A2:A7="Fred"),C2:C7)

Hope this helps!

In article ,
Smugga wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default lookup latest entered match

Have you tried the formula? The formula will find the last instance of
'Fred', which in your example would be Row 4, and return the
corresponding value in Column C, which in your example would be 5/15/06.

In article ,
Smugga wrote:

It almost answers the question. I would like the date returned, and not
Fred... What I am searching for is the last time (date) that Fred was
entered.
-G

"Domenic" wrote:

Assuming that A2:C7 contains the data, try...

=LOOKUP(2,1/(A2:A7="Fred"),C2:C7)

Hope this helps!

In article ,
Smugga wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date
(1/5/05)
in column C. I am looking for a way to return the last entered "Fred".




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Smugga
 
Posts: n/a
Default lookup latest entered match

Thanks Domenic! It works.

-Smugga

"Domenic" wrote:

Assuming that A2:C7 contains the data, try...

=LOOKUP(2,1/(A2:A7="Fred"),C2:C7)

Hope this helps!

In article ,
Smugga wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default lookup latest entered match

Hi Domenic!
I've the same problem and your solution works very well but... I can't
understand it... :-(
What is: 1/(A2:A7="Fred") ? What does it mean?

Thank you very much...
paola

"Domenic" wrote:

Assuming that A2:C7 contains the data, try...

=LOOKUP(2,1/(A2:A7="Fred"),C2:C7)

Hope this helps!

In article ,
Smugga wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default lookup latest entered match

Hi Domenic!
I have the same problem and your solution works very well but... I can't
understand it... :-(

What is 1/(A2:A7="Fred")?
What does it means?

Thank you very much...
paola

"Domenic" wrote:

Assuming that A2:C7 contains the data, try...

=LOOKUP(2,1/(A2:A7="Fred"),C2:C7)

Hope this helps!

In article ,
Smugga wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".


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
Compound Lookup, Large/Small, Match... uw805 Excel Worksheet Functions 3 June 14th 06 01:46 AM
Lookup Function and Match galv2 Excel Discussion (Misc queries) 2 December 24th 05 07:05 PM
Complicated If Then / V Lookup / Match Statement... ryesworld Excel Worksheet Functions 17 December 10th 05 02:09 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Lookup / Match help ??? RayG Excel Discussion (Misc queries) 3 January 14th 05 02:13 AM


All times are GMT +1. The time now is 08:19 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"