ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   v lookup (https://www.excelbanter.com/excel-programming/422875-v-lookup.html)

sonto

v lookup
 
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

sonto

v lookup
 
SORRY FOR THE MISTYPE.I MEANT VLOOKUP FORMULA THROUGH A MACRO

"sonto" wrote:

Is thre a way that you can do vlookup formula in a workbook in that it checks
for data from a hidden worksheet 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


Dave Peterson

v lookup
 
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



sonto wrote:

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


--

Dave Peterson


All times are GMT +1. The time now is 03:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com