ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/39920-vlookup.html)

Sara Gilbert

vlookup
 
I am trying to create a lookup where I am entering a 10 account number digit
but my database only has 8 number digits. I want my lookup to ignore the
last two digit I enter and give me the corresponding 8 digit number

aristotle

Hi,

Lookup value is in e.g. A1:

=VLOOKUP(LEFT(A1,8),Lookup_Table,1,0)

Where Lookup_Table is the table or array you want to return the
corresponding number from.

Regards,
A

"Sara Gilbert" wrote:

I am trying to create a lookup where I am entering a 10 account number digit
but my database only has 8 number digits. I want my lookup to ignore the
last two digit I enter and give me the corresponding 8 digit number


Dave Peterson

=vlookup(int(a1/100),yourtable,2,false)
If those values are numbers.

=vlookup(left(a1,8),yourtable,2,false)
if the values are text.


Sara Gilbert wrote:

I am trying to create a lookup where I am entering a 10 account number digit
but my database only has 8 number digits. I want my lookup to ignore the
last two digit I enter and give me the corresponding 8 digit number


--

Dave Peterson

Sara Gilbert

unfortunately gives me: #N/A


=VLOOKUP(LEFT(B13,8),Data,2)

Data is my database info on another sheet

"aristotle" wrote:

Hi,

Lookup value is in e.g. A1:

=VLOOKUP(LEFT(A1,8),Lookup_Table,1,0)

Where Lookup_Table is the table or array you want to return the
corresponding number from.

Regards,
A

"Sara Gilbert" wrote:

I am trying to create a lookup where I am entering a 10 account number digit
but my database only has 8 number digits. I want my lookup to ignore the
last two digit I enter and give me the corresponding 8 digit number


Sara Gilbert

Worked with the first formule.

Thanks a lot!

"Dave Peterson" wrote:

=vlookup(int(a1/100),yourtable,2,false)
If those values are numbers.

=vlookup(left(a1,8),yourtable,2,false)
if the values are text.


Sara Gilbert wrote:

I am trying to create a lookup where I am entering a 10 account number digit
but my database only has 8 number digits. I want my lookup to ignore the
last two digit I enter and give me the corresponding 8 digit number


--

Dave Peterson



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

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