Issue with vlookup

manekankit

Board Regular
Joined
Feb 1, 2019
Messages
72
Office Version
  1. 365
Platform
  1. Windows
Having below issue while applying vlookup

Column A1 to 100 contains customer codes, all numerical

Column b1 to 100 contains customer balances

A and B values are loaded directly from accounting software through Excel add-in. Column A values are all digits but loaded in text format.

In cell c1, i type customer code manually.

I want to apply vlookup in cell D1, that will lookup c1 value in column A and give balance from column B.

But as values in column A are stored in text format, vlookup formula is resulting in an error.

If i conver all values in column A to numbers, vlookup works fine.

Is there any way out through vlookup or other formula to get values in cell D1 without converting column A values to numbers
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Index Match here. XLOOKUP aught to work if you have 365.

MrExcelPlayground12.xlsx
ABCD
11a2b
22b
33c
44d
55e
66f
Sheet9
Cell Formulas
RangeFormula
D1D1=INDEX(B1:B6,MATCH(C1,VALUE(A1:A6),0))
 
Upvote 0
Did you try converting C1 to Text format?
Thanks for your suggestion.

How to do that?

My file is structured such that i don't want to make any changes to columns a, b and even c.

Can values in c1 be converted through any formula in D1, if so, i can combine vlookup formula in d1 and then it should work.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try using
Excel Formula:
=Vlookup(C1&"",A1:B100,2,0)
 
Upvote 0
Solution
Index Match here. XLOOKUP aught to work if you have 365.

MrExcelPlayground12.xlsx
ABCD
11a2b
22b
33c
44d
55e
66f
Sheet9
Cell Formulas
RangeFormula
D1D1=INDEX(B1:B6,MATCH(C1,VALUE(A1:A6),0))
Thanks for the reply.

I also want to use c1 as criteria for sumif in say E1 cell. So, how can i do that?
 
Upvote 0
You said you wanted to use Vlookup, so why are you now saying Sumif?
 
Upvote 0
You said you wanted to use Vlookup, so why are you now saying Sumif?
Hi, sorry for inconvenience.

I want to use both, both formulas resulting in error.

To avoid longer post, i gave example of vlookup.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try using
Excel Formula:
=Vlookup(C1&"",A1:B100,2,0)
Account details updated.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top