Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Find Last instance colum A and return corresponding B Value

Hi
I have two columns of data one with numbers (columnA) and the other with Y or N (column b)
What I'd like to do is find the last instance of a number in column A and return the corresponding B value. Column A value can appear any number of times.

e.g

Column A Column B
100 N
101 N
101 Y
102 N
103 N
103 N
103 Y
104 N
104 Y

Essentially for each of 100,101,102 etc I want to look at the last instance of it in column A and return to my secified cell what the corresponding B value is

All help appreciated.

Thanks
Will.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Find Last instance colum A and return corresponding B Value

Hi Will,

Am Tue, 2 Jul 2013 12:29:17 +0100 schrieb Will3001:

Column A Column B
100 N
101 N
101 Y
102 N
103 N
103 N
103 Y
104 N
104 Y


for 100 try:
=INDEX($B$1:$B$100,LOOKUP(2,1/($A$1:$A$100=100),ROW($1:$100)))
you also can change the value with a cell reference


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Junior Member
 
Posts: 2
Default

Hi Claus,

That appears to do the job nicely, thank you, will try it on a larger data set later on..

Thanks again
Will.

Quote:
Originally Posted by Claus Busch View Post
Hi Will,

Am Tue, 2 Jul 2013 12:29:17 +0100 schrieb Will3001:

Column A Column B
100 N
101 N
101 Y
102 N
103 N
103 N
103 Y
104 N
104 Y


for 100 try:
=INDEX($B$1:$B$100,LOOKUP(2,1/($A$1:$A$100=100),ROW($1:$100)))
you also can change the value with a cell reference


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
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
Find value in column, return value in same position of other colum Josiecorey Excel Worksheet Functions 1 June 17th 08 02:12 AM
A function to find a phrase within a range of cells and return the address of the first instance. [email protected] Excel Programming 2 December 5th 06 07:02 PM
Look up data in colum a and find match in colum b Chris(new user) Excel Discussion (Misc queries) 1 March 22nd 05 01:41 PM
Check data on colum A and find match on colum b Chris(new user) Excel Discussion (Misc queries) 3 March 20th 05 04:45 PM
Look up data in colum a and find match in colum b Chris(new user) Excel Discussion (Misc queries) 1 March 19th 05 09:27 PM


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