VLOOKUP #VALUE! error message A value used in the formula is of the wrong data type

KennyA

Board Regular
Joined
Jul 1, 2015
Messages
84
I have tried everything I can think of on this.

The Formula in cell B2 is:
=VLOOKUP(C2,C6:D38,2,FALSE)

The result should only be a number. For example 100 through 138.
I checked and there are no extra spaces before or after the number. The cell is formated as General. I have also tried formatting the cell as a number.

I am using Excel 2013.

Any ideas? Thanks
 
Aladin,
D2 is the Quantity of the items. It is populated through the user form and works fine.

Jonmo1
Now I understand. Thanks

I will give the solution a try as soon as I can today. I was not aware there was a character limit of 255. Today was not a waste since I learned something!
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Aladin,
D2 is the Quantity of the items. It is populated through the user form and works fine.

Jonmo1
Now I understand. Thanks

I will give the solution a try as soon as I can today. I was not aware there was a character limit of 255. Today was not a waste since I learned something!

Your C3 is incomplete... Might be better to have:

=IF(D2>0,IF(ISNUMBER(B2),VLOOKUP(B2,B6:F38,2,0),""),"")

The same logic would apply for others.
 
Upvote 0
I just tried Aladins' solution and it works! You guys are awesome!! Thank you so much.

Next is to learn about the INDEX, MATCH and ISNUMBER functions. I have only been working with formulas and macros for a very short time so this is great. So glad that you guys are there to help. Thanks again
 
Upvote 0
I just tried Aladins' solution and it works! You guys are awesome!! Thank you so much.

Next is to learn about the INDEX, MATCH and ISNUMBER functions. I have only been working with formulas and macros for a very short time so this is great. So glad that you guys are there to help. Thanks again

You are welcome.
 
Upvote 0

Forum statistics

Threads
1,215,125
Messages
6,123,195
Members
449,090
Latest member
bes000

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