2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

VLOOKUP Acting strange, Sometimes it pulls the right value, sometimes it doesn't?

I've been fighting with this one for almost a year at this point and I'm hoping one of you can point out my issue.

I built a spreadsheet for our company so our CRM manager can quickly look up pricing information from our supplier. On it I have 2 tabs, the "Worksheet" and the "Price List" (I can't share the spreadsheet because of this).

The worksheets is setup, left to right, like this:

Part Number , Description , Quantity, Cost, Extended cost, Cost in CAD + Shipping, Selling price

The VLOOKUP I'm having issues with is for the description.

=IF(A2="","",VLOOKUP(TEXT(A2,"0"),'Price List'!B1:'Price List'!C:C,2,0))

I would say it works 80% of the time but fairly often will return #N/A.

The kicker is that I'm using a second VLOOKUP to pull the price (1 column over from the description in the price list) and this one works flawlessly EVERY time.

=VLOOKUP(VALUE(A2),VALUE('Price List'!$B$1:$D$15070),3,0)

Part number is in column B.

Can anybody spot what's going on with this? I've confirmed all the description boxes are formatted as Text, no extra spaces anywhere, tried using TRIM. Not sure what's going on. Any help would be greatly appreciated.

Edit 1: Using XLOOKUP yields the same result on the same part numbers.

=IF(A2="","",XLOOKUP([@[Article no.]],'Price List'!B:B,'Price List'!C:C,,0,1))

submitted by /u/Relikar
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#VLOOKUP
#XLOOKUP
#Excel
#Spreadsheet
#Formula
#Pricing
#Part Number
#Description
#CRM
#Supplier
#Text
#Value
#Column
#Tab
#Error
#N/A
#TRIM
#Quantity
#Cost
#Lookup