v lookup

S

sonto

Is thre a way that you can do vlookup formula in a workbook in that it checks
for data from a hidden workshhet in a workbook.I have also created a userform
but after it hides I would want to be called when a buttun is clicked as when
the userform is displayed on the screen you can not edit the worksheet
 
D

Dave Peterson

Excel and VBA can both access hidden worksheets.

In code:

dim res as variant 'could be an error
dim LookUpRng as range
dim myStr as string

with worksheets("Hiddenworksheetnamehere")
set lookuprng = .range("a:e")
end with

mystr = "Somevaluetomatch"

'false for an exact match
res = application.vlookup(mystr, lookuprng, 2, false)

if iserror(res) then
'no match found
else
msgbox res
end if

=======

Are you trying to design an data entry input form?

If yes, you may want to look at excel's built in version:
Data|Form (in xl2003 menus)

If that's not enough...
You could look at John Walkenbach's enhanced data form:
http://j-walk.com/ss/dataform/index.htm

The source code is available for a small fee ($20 USA, IIRC). So you can modify
it as much as you want.

And if you want to design your own:

Debra Dalgleish shares some tips:
http://contextures.com/xlUserForm01.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top