ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlookup with more than number to be retrieved (https://www.excelbanter.com/excel-worksheet-functions/49370-vlookup-more-than-number-retrieved.html)

martelie

vlookup with more than number to be retrieved
 

I have a list of users and their corresponding mobile numbers. I also
have a bill list with names and the numbers being charged to the
names.
I have used vlookup to retrieve the number being charged to a person.
(a person who i have as having a number)
I use this to check that the correct number is being billed to a user.
However, some users are being billed twice for two different numbers,
but vlookup only shows me the first number they are being charged for.
Is there a way to see both numbers relating to a persons name?

eg

list 1
name number number being billed for(vlookup used for this)
john 12345 56789
paul 54321 54321

list 2
name number
john 56789
john 12345
paul 54321
chris 99999

so john appears twice, but i only see the first number he is being
charged to.. is there not a way for it to be

number being billed for: 56789, 12345 ?

any help or advice would be greatly appreciated.

Martelie


--
martelie

Roger Govier

Hi

One way
Insert a new column A and enter the following formula
=B1&" | "&C1 and copy down as far as your data extends.
You will now have unique "names" in your table but your table range will
need to be extended to accommodate the new column

Carry out your lookup by
=VLOOKUP("John | 56789",Table,offset,0)


Regards

Roger Govier



martelie wrote:

I have a list of users and their corresponding mobile numbers. I also
have a bill list with names and the numbers being charged to the
names.
I have used vlookup to retrieve the number being charged to a person.
(a person who i have as having a number)
I use this to check that the correct number is being billed to a user.
However, some users are being billed twice for two different numbers,
but vlookup only shows me the first number they are being charged for.
Is there a way to see both numbers relating to a persons name?

eg

list 1
name number number being billed for(vlookup used for this)
john 12345 56789
paul 54321 54321

list 2
name number
john 56789
john 12345
paul 54321
chris 99999

so john appears twice, but i only see the first number he is being
charged to.. is there not a way for it to be

number being billed for: 56789, 12345 ?

any help or advice would be greatly appreciated.

Martelie






All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com