Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Finding second value?

$1B3 thru B20 has names of people. $1C3 thru C20 has numbers. There are
some duplicate names in B3 thru B20. When I enter name in $2D4 I would like
$2E4 to have number from $C3 thru C20 that matches name. More importantly,
I would like $2E5 to show the second corresponding number to the same name.
I can get the first match with VLOOKUP. I am having difficulty getting
second number.

Thanks
Bobby
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Finding second value?

Create a unique reference for each name in a helper column, for
example put this formula in F3:

=IF(B3="","",B3&"_"&COUNTIF(B$3:B3,B3))

and copy down to F20. Then with a name in D4, put this formula in E4:

=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D
$4&"_"&ROW(E1),F$3:F$20,0)))

and then copy this down for as many rows as you think there may be
duplicates (eg to E7).

Hope this helps.

Pete


On Aug 17, 6:27*am, bgkgmg wrote:
$1B3 thru B20 has names of people. *$1C3 thru C20 has numbers. *There are
some duplicate names in B3 thru B20. *When I enter name in $2D4 I would like
$2E4 to have *number from $C3 thru C20 that matches name. *More importantly,
I would like $2E5 to show the second corresponding number to the same name. *
I can get the first match with VLOOKUP. *I am having difficulty getting
second number.

Thanks
Bobby


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Finding second value?

Thanks for response and using helper cells has helped on other situations.
I copied your formula into E4
=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)))
then into E5. What am I changing to this formula in E5 to find the second
match? Also what is meaning $ when you use. I used as short for sheet.
Where you just copying my entry or is it used for other purpose.

I appreciate your help
Thanks
Bobby


"Pete_UK" wrote:

Create a unique reference for each name in a helper column, for
example put this formula in F3:

=IF(B3="","",B3&"_"&COUNTIF(B$3:B3,B3))

and copy down to F20. Then with a name in D4, put this formula in E4:

=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D
$4&"_"&ROW(E1),F$3:F$20,0)))

and then copy this down for as many rows as you think there may be
duplicates (eg to E7).

Hope this helps.

Pete


On Aug 17, 6:27 am, bgkgmg wrote:
$1B3 thru B20 has names of people. $1C3 thru C20 has numbers. There are
some duplicate names in B3 thru B20. When I enter name in $2D4 I would like
$2E4 to have number from $C3 thru C20 that matches name. More importantly,
I would like $2E5 to show the second corresponding number to the same name.
I can get the first match with VLOOKUP. I am having difficulty getting
second number.

Thanks
Bobby



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Finding second value?

Until Pete_UK gives you some more information on how it's working, I think
that a explanation of the use of the $ symbol (and lack of using it) in
addressing will help you understand a little more.
When used with a cell address, the $ symbol makes the address Absolute.
Absolute means unchanging as the address is copied or filled to other cells
on the sheet. Either the column part or the row part of an address, or both
parts, may be made absolute or left relative.

Try some experiments and you'll understand better.

Enter a series in row 1 of a sheet, simpy 1 2 3 4 5 at A1, B1, C1, D1 and E1
will do.

Now down below at F2 enter this formula:
=E1
fill that formula to the left all the way to column A. Notice that you get
this as a result:
#REF! 1 2 3 4 5
=E1 was a completely relative address. As you filled it to the left, the
column portion automatically changed by one column, so you got the series
from row 1 until you filled the formula into column A, when you got the #REF!
error, because there is no column to the left of column A.

Now select F2 and fill it down the column into F3, F4 and F5. Notice that
is now shows
5
4
and then goes to zeros, it changed to =E2 in F3 which was 4 from the formula
in E2, and went to zeros because there's nothing below E2 on the sheet.

Try the experiments using =$E1, =E$1 and =$E$1 as the starting formula in F2
instead of just =E2 and observe the different results you get.




"bgkgmg" wrote:

Thanks for response and using helper cells has helped on other situations.
I copied your formula into E4
=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)))
then into E5. What am I changing to this formula in E5 to find the second
match? Also what is meaning $ when you use. I used as short for sheet.
Where you just copying my entry or is it used for other purpose.

I appreciate your help
Thanks
Bobby


"Pete_UK" wrote:

Create a unique reference for each name in a helper column, for
example put this formula in F3:

=IF(B3="","",B3&"_"&COUNTIF(B$3:B3,B3))

and copy down to F20. Then with a name in D4, put this formula in E4:

=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D
$4&"_"&ROW(E1),F$3:F$20,0)))

and then copy this down for as many rows as you think there may be
duplicates (eg to E7).

Hope this helps.

Pete


On Aug 17, 6:27 am, bgkgmg wrote:
$1B3 thru B20 has names of people. $1C3 thru C20 has numbers. There are
some duplicate names in B3 thru B20. When I enter name in $2D4 I would like
$2E4 to have number from $C3 thru C20 that matches name. More importantly,
I would like $2E5 to show the second corresponding number to the same name.
I can get the first match with VLOOKUP. I am having difficulty getting
second number.

Thanks
Bobby



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Finding second value?

Once I understood $ I was able to make Petes formula work.
Thanks

"JLatham" wrote:

Until Pete_UK gives you some more information on how it's working, I think
that a explanation of the use of the $ symbol (and lack of using it) in
addressing will help you understand a little more.
When used with a cell address, the $ symbol makes the address Absolute.
Absolute means unchanging as the address is copied or filled to other cells
on the sheet. Either the column part or the row part of an address, or both
parts, may be made absolute or left relative.

Try some experiments and you'll understand better.

Enter a series in row 1 of a sheet, simpy 1 2 3 4 5 at A1, B1, C1, D1 and E1
will do.

Now down below at F2 enter this formula:
=E1
fill that formula to the left all the way to column A. Notice that you get
this as a result:
#REF! 1 2 3 4 5
=E1 was a completely relative address. As you filled it to the left, the
column portion automatically changed by one column, so you got the series
from row 1 until you filled the formula into column A, when you got the #REF!
error, because there is no column to the left of column A.

Now select F2 and fill it down the column into F3, F4 and F5. Notice that
is now shows
5
4
and then goes to zeros, it changed to =E2 in F3 which was 4 from the formula
in E2, and went to zeros because there's nothing below E2 on the sheet.

Try the experiments using =$E1, =E$1 and =$E$1 as the starting formula in F2
instead of just =E2 and observe the different results you get.




"bgkgmg" wrote:

Thanks for response and using helper cells has helped on other situations.
I copied your formula into E4
=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)))
then into E5. What am I changing to this formula in E5 to find the second
match? Also what is meaning $ when you use. I used as short for sheet.
Where you just copying my entry or is it used for other purpose.

I appreciate your help
Thanks
Bobby


"Pete_UK" wrote:

Create a unique reference for each name in a helper column, for
example put this formula in F3:

=IF(B3="","",B3&"_"&COUNTIF(B$3:B3,B3))

and copy down to F20. Then with a name in D4, put this formula in E4:

=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D
$4&"_"&ROW(E1),F$3:F$20,0)))

and then copy this down for as many rows as you think there may be
duplicates (eg to E7).

Hope this helps.

Pete


On Aug 17, 6:27 am, bgkgmg wrote:
$1B3 thru B20 has names of people. $1C3 thru C20 has numbers. There are
some duplicate names in B3 thru B20. When I enter name in $2D4 I would like
$2E4 to have number from $C3 thru C20 that matches name. More importantly,
I would like $2E5 to show the second corresponding number to the same name.
I can get the first match with VLOOKUP. I am having difficulty getting
second number.

Thanks
Bobby




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Finding second value?

Glad to hear that. Always nice to know that I played some small part in a
successful team effort.

Sometimes it's not just the "what" of a thing that you need to understand
but also the "why" or "how" of it. Especially when trying to adapt a general
tool to a specific use. What you've learned here should serve you well in
your future work with Excel worksheet formulas.

"bgkgmg" wrote:

Once I understood $ I was able to make Petes formula work.
Thanks

"JLatham" wrote:

Until Pete_UK gives you some more information on how it's working, I think
that a explanation of the use of the $ symbol (and lack of using it) in
addressing will help you understand a little more.
When used with a cell address, the $ symbol makes the address Absolute.
Absolute means unchanging as the address is copied or filled to other cells
on the sheet. Either the column part or the row part of an address, or both
parts, may be made absolute or left relative.

Try some experiments and you'll understand better.

Enter a series in row 1 of a sheet, simpy 1 2 3 4 5 at A1, B1, C1, D1 and E1
will do.

Now down below at F2 enter this formula:
=E1
fill that formula to the left all the way to column A. Notice that you get
this as a result:
#REF! 1 2 3 4 5
=E1 was a completely relative address. As you filled it to the left, the
column portion automatically changed by one column, so you got the series
from row 1 until you filled the formula into column A, when you got the #REF!
error, because there is no column to the left of column A.

Now select F2 and fill it down the column into F3, F4 and F5. Notice that
is now shows
5
4
and then goes to zeros, it changed to =E2 in F3 which was 4 from the formula
in E2, and went to zeros because there's nothing below E2 on the sheet.

Try the experiments using =$E1, =E$1 and =$E$1 as the starting formula in F2
instead of just =E2 and observe the different results you get.




"bgkgmg" wrote:

Thanks for response and using helper cells has helped on other situations.
I copied your formula into E4
=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)))
then into E5. What am I changing to this formula in E5 to find the second
match? Also what is meaning $ when you use. I used as short for sheet.
Where you just copying my entry or is it used for other purpose.

I appreciate your help
Thanks
Bobby


"Pete_UK" wrote:

Create a unique reference for each name in a helper column, for
example put this formula in F3:

=IF(B3="","",B3&"_"&COUNTIF(B$3:B3,B3))

and copy down to F20. Then with a name in D4, put this formula in E4:

=IF(ISNA(MATCH(D$4&"_"&ROW(E1),F$3:F$20,0)),"",IND EX(C$3:C$20,MATCH(D
$4&"_"&ROW(E1),F$3:F$20,0)))

and then copy this down for as many rows as you think there may be
duplicates (eg to E7).

Hope this helps.

Pete


On Aug 17, 6:27 am, bgkgmg wrote:
$1B3 thru B20 has names of people. $1C3 thru C20 has numbers. There are
some duplicate names in B3 thru B20. When I enter name in $2D4 I would like
$2E4 to have number from $C3 thru C20 that matches name. More importantly,
I would like $2E5 to show the second corresponding number to the same name.
I can get the first match with VLOOKUP. I am having difficulty getting
second number.

Thanks
Bobby


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Finding second value?

There are a couple of ways to do this shown on this page:
http://www.techonthenet.com/excel/formulas/vlookup.php
one of them is pretty much the same as offered by Pete_UK, while down near
the bottom of the page is an array formula method that doesn't require the
helper column. I personally think that the use of the helper column, as
Pete_UK has suggested, is probably a more understandable setup for anyone
coming along later and trying to "maintain" or understand just exactly what's
going on.

"bgkgmg" wrote:

$1B3 thru B20 has names of people. $1C3 thru C20 has numbers. There are
some duplicate names in B3 thru B20. When I enter name in $2D4 I would like
$2E4 to have number from $C3 thru C20 that matches name. More importantly,
I would like $2E5 to show the second corresponding number to the same name.
I can get the first match with VLOOKUP. I am having difficulty getting
second number.

Thanks
Bobby

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
Finding non-zero value Tom Stout Excel Discussion (Misc queries) 2 November 21st 07 05:20 PM
Finding the value of x bpiepkorn Excel Worksheet Functions 4 July 26th 07 04:02 PM
Finding The MAX Value carl Excel Worksheet Functions 6 July 25th 07 09:36 PM
Finding last used mikefranklin1969 Excel Worksheet Functions 1 May 12th 06 10:05 PM
Finding value tkaplan Excel Discussion (Misc queries) 2 October 21st 05 08:19 PM


All times are GMT +1. The time now is 09:35 AM.

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"