Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

vlookup vba

ResolvedVersion 2007

Susanna has attended:
Excel VBA Intro Intermediate course
Taking Minutes course
Excel VBA Advanced course
Excel PowerPivot course

Vlookup in VBA

I don't manage to make VLookUp function work in VBA, when working with 2 different excel files. I have tried at least 5 or 6 different suggestion found on Internet, with no positive result. I can send the file with the code and the data if you give me an e-mail address.
Thanks a lot,
Susanna

RE: Vlookup in VBA

Hi Susanna,

Thank you for the forum question.

Yes please send me the file, so I can see what you want to do.

Please forward the file to:

info@stl-training.co.uk

Please add my name to the subject.

Thanks


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Read more: https://www.stl-training.co.uk/post-34560-formula-shows-quarters.html #ixzz2wE8kbKnu

RE: Vlookup in VBA

Hi Susanna,

Please change the variable OrdNum from string to long:

Dim OrdNum As Long

This is the only thing you need to do to make it work.



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Read more: https://www.stl-training.co.uk/post-34560-formula-shows-quarters.html #ixzz2wE8kbKnu

RE: Vlookup in VBA

Hi Jens,

it does work, thanks a lot!!!!!!!!!!!! So simple the solution, and I did not find it (or see it) in all my searchs in the Internet. So much time lost :-(!!!

Thanks a lot again,

Susanna

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Reconciling a list to correspond with another

May have a list that needs to make but on another sheet one list seems to be out, eg. product list one sheet contains all product and inventory data, while the other contains pricing data. Both need to match with all products but there is more products in one list than the other. To find the disparaging product compare data in the two columns that need to match Make sure that order the same way.
Create another column in the sheet that has the most items and type in the first cell


=Exact(text1,text2) text1 being the cell that you want compared with text2 cell reference. Drag to filldown and your first false will give you for first cells that does not match. Correct insert the row with data in other sheet and continue the process until all the data returns true. Delete the column inserted.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.