Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Lookup in VBA Array

Dim Res as Variant
Dim Sh as Worksheet
Dim bRes as Boolean
For each Sh in Workbook
Res = Application.VLookup(sh.Name, SheetName,2,0)
if not iserror(Res) then
bRes = Res

end if

Next


--
Regards,
Tom Ogilvy



"ExcelMonkey" wrote in message
...
I have a 2D array with text strings (sheet names) in
column 1 and boolean values (1 or 0) in column 2. I want
to be able to do a lookup of the boolean values for each
sheet within the sheet name array while in a For Each
Loop.The idea being that I will do search based on name
propterty of the sheet that I am looping through.

For each Sh in Workbook
Lookup boolean in column 2 of SheetName Array based on
sh.Name
Next

Not sure how to use lookups in VBA



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use array for lookup value, to return array of lookups Glen Excel Discussion (Misc queries) 3 May 7th 09 11:55 PM
Lookup or Array or Something???? Chris Kingham Excel Discussion (Misc queries) 3 January 5th 07 09:14 PM
Lookup "greater than or equal to" in lookup array icemouse New Users to Excel 3 February 16th 06 10:07 PM
lookup array BEEJAY Excel Worksheet Functions 2 January 26th 05 09:03 PM
Array Lookup ExcelMonkey[_58_] Excel Programming 6 February 1st 04 04:36 PM


All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"