ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to find values in a list of text fields (https://www.excelbanter.com/excel-worksheet-functions/190489-how-find-values-list-text-fields.html)

[email protected]

How to find values in a list of text fields
 
On sheet A I have account codes entered as numeric fields. On sheet B
I have a list of account codes (formatted as text) and their
corresponding account name.

Looking up the account code in sheet A I want to find that account
code in sheet B and return the account name.

How can I use a numeric field in A to find items that are formatted as
text in sheet B?

Thanks for any help.

Stefi

How to find values in a list of text fields
 
If your account codes (formatted as text) are of fixed length (5 in my
example, "00000" represents five digits, change it to your needs!), ), try
this:
=VLOOKUP(TEXT(A2,"00000"),SheetB!A:B,2,FALSE)

Regards,
Stefi


€ť ezt Ă*rta:

On sheet A I have account codes entered as numeric fields. On sheet B
I have a list of account codes (formatted as text) and their
corresponding account name.

Looking up the account code in sheet A I want to find that account
code in sheet B and return the account name.

How can I use a numeric field in A to find items that are formatted as
text in sheet B?

Thanks for any help.


[email protected]

How to find values in a list of text fields
 
On Jun 9, 2:43*pm, Stefi wrote:
If your account codes (formatted as text) are of fixed length (5 in my
example, "00000" represents five digits, change it to your needs!), ), try
this:
=VLOOKUP(TEXT(A2,"00000"),SheetB!A:B,2,FALSE)

Regards,
Stefi

” ezt írta:



On sheet A I have account codes entered as numeric fields. *On sheet B
I have a list of account codes (formatted as text) and their
corresponding account name.


Looking up the account code in sheet A I want to find that account
code in sheet B and return the account name.


How can I use a numeric field in A to find items that are formatted as
text in sheet B?


Thanks for any help.- Hide quoted text -


- Show quoted text -


Works great except...the fields vary in length. Is there any way to
make this element in the formula more dynamic?

[email protected]

How to find values in a list of text fields
 
If I just change the formula to

=VLOOKUP(TEXT(A2,"0"),SheetB!A:B,2,FALSE)

it will handle different length text strings.
Excellent!

Stefi

How to find values in a list of text fields
 
Be careful! Yes, if you don't have leading zeros in codes in SheetB!A:B. No,
if you have!
Stefi


€ť ezt Ă*rta:

If I just change the formula to

=VLOOKUP(TEXT(A2,"0"),SheetB!A:B,2,FALSE)

it will handle different length text strings.
Excellent!



All times are GMT +1. The time now is 08:45 PM.

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