beep on unsucessful vlookup

flemard

New Member
Joined
Apr 20, 2011
Messages
3
I am looking for a formula to produce a Beep when vlookup fails to find a match in the reference table.
This will alert the operator to a mis keyed entry
A non VBA solution is preferred.
many thanks
Don.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the board.

There's no way to make Excel beep without VBA.
 
Upvote 0
Thanks for the reply.
Is there a VBA solution you could recommend?
I am looking for an audible alert when vlookup fails to find a match in the reference table.
Many thanks
Don
 
Upvote 0
I would recommend that you use conditional formatting to make the cell bright red if it contains #N/A as a result of the lookup failing. A beep gives the user no clue where the problem is.
 
Upvote 0
Excellent idea. I'll add conditional formatting but the audible alert will ensure they look at the screen, rather than plowing ahead with data entry.
Would you have a solution for that?
thanks
Don
 
Upvote 0
Code:
Function VVLookup(vWhat As Variant, _
                  av As Variant, _
                  iCol As Long, _
                  Optional bRangeLookup As Boolean = True) As Variant
    VVLookup = Application.VLookup(vWhat, av, iCol, bRangeLookup)
    If IsError(VVLookup) Then Beep
End Function

I predict users will be chasing you with pitchforks in the night.
 
Upvote 0

Forum statistics

Threads
1,224,531
Messages
6,179,384
Members
452,908
Latest member
MTDelphis

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