Vlookup in vba stopped working after updating excel

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
The code below used to work fine. I updated office and now the code stopped working. Any idea why? Thank you so much.

Code:
Sub price()
Dim item As String
Dim x As String
item = InputBox("enter Name")
Sheets("phone").Activate
x = WorksheetFunction.VLookup(item, Range("A2:B171"), 2, False)
MsgBox item & "  phone# is -->   " & x

End Sub


The table is this (part of it)



demo (1).xlsm
AB
1namephone#
2mary1416-111-1111
3mike1416-123-1515
4john1647-222-3333
5sarah1905-147-0101
6david1416-111-0001
7anna1416-123-1516
8alex1647-222-3334
9liz1905-147-0102
phone
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
This probably related to bug.

If you Google, people are complaining about macro not working after update. :(
 
Upvote 0
Solution

Forum statistics

Threads
1,214,424
Messages
6,119,407
Members
448,894
Latest member
spenstar

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