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

XLOOKUP in VBA is Providing Errors

Our take

If you're encountering a Type Mismatch error while using XLOOKUP in your VBA macro, it’s likely due to a data type inconsistency between the values you're comparing. In your case, you want to find a cell based on the contents of two other cells and concatenate text from a third cell. To resolve this, ensure that all referenced cells contain compatible data types. For example, verify that the lookup values are all strings or numbers as appropriate.

I am trying to create a macro that will be able to find a cell based on the contents of two other cells and add the text from a third cell to the end of the referenced cell in question. Every time I try to run this, it throws an error, currently of Type Mismatch.

In the attached screenshot, John Smith should end up with 1 Cabernet, 2 Bottles Champagne as his text in column c.

What am I doing wrong?

https://preview.redd.it/uu461ldzt6yg1.png?width=1415&format=png&auto=webp&s=46129c36227621b368a33a2bdaf1b8448c959641

https://preview.redd.it/mw1owkdzt6yg1.png?width=1358&format=png&auto=webp&s=0bfbc73da04d927a28c7254148d567768c84a5f6

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

Read on the original site

Open the publisher's page for the full experience

View original article

Tagged with

#rows.com#Excel compatibility#cloud-based spreadsheet applications#Excel alternatives for data analysis#real-time data collaboration#financial modeling with spreadsheets#real-time collaboration#Excel alternatives#XLOOKUP#VBA#Type Mismatch#macro#error#cell#text#column#contents#referenced cell#find#screenshot