Search and add numbers from many WBs depending on ID column
Assuming all the required workbooks are open, and assuming you are
doing the sensible thing and keeping your application workbook (with
the code in) separate from the data, you can loop through the open
workbooks like so...
Dim wbk as Workbook
Dim wks as Worksheet
' Loop through open workbooks
For each wbk in Application.Workbooks
'Ignore application workbook
if wbk < Thisworkbook then
'Loop through worksheets in each workbook
For each wks in wbk.Worksheets
'Put your search code etc. in here
'
'
Next wks
End If
Next wbk
That's enough for now - I mean you wouldn't want me to do the whole
thing for you would you. ?;^)
Kind regards, NickH
|