Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an excel workbook and I'd like to run a procedure on all the
worksheets in the workbook, unless it is a worksheet called "description" or "data". If it is one of these two worksheets, then the program need do nothing. But if it is not one of these worksheets, then the programme should run the procedure. What would be the right VB code to do this? On a separate note, I also have an excel worksheet called "filter" with contains data info to run an advanced filter to extract from a larger dataset. The data set with the info to run an advanced filter, for example, is: firstname lastname indexno. Larry Reeves 77642 Mary Adams 98789 Nancy Hopper 76543 I'd like to use the above dataset to extract the full line of info from the complete dataset which is on another worksheet called "full data" in the workbook. The complete data set in the "full data" worksheet is, for example: firstname lastname indexno. address birthday Larry Reeves 77642 40 Mohawk 1/19/70 Mary Adams 98789 10 Brook Lane 6/3/64 Nancy Hopper 76543 82 Farm Hill 4/22/73 (There'd also be a lot of other names and info in this data set, but I would like to extract just the ones specified in the first smaller dataset created to do the advanced filter) How could I write the VB code to do this? Thanks. Matthew Kramer *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
for the first question try something like sub foo() dim wks as worksheet for each wks in worksheets if lcase(wks.name)<"description" and _ lcase(wks.name)<"data" then 'your code end if next end sub -- Regards Frank Kabel Frankfurt, Germany "Matthew Kramer" schrieb im Newsbeitrag ... I have an excel workbook and I'd like to run a procedure on all the worksheets in the workbook, unless it is a worksheet called "description" or "data". If it is one of these two worksheets, then the program need do nothing. But if it is not one of these worksheets, then the programme should run the procedure. What would be the right VB code to do this? On a separate note, I also have an excel worksheet called "filter" with contains data info to run an advanced filter to extract from a larger dataset. The data set with the info to run an advanced filter, for example, is: firstname lastname indexno. Larry Reeves 77642 Mary Adams 98789 Nancy Hopper 76543 I'd like to use the above dataset to extract the full line of info from the complete dataset which is on another worksheet called "full data" in the workbook. The complete data set in the "full data" worksheet is, for example: firstname lastname indexno. address birthday Larry Reeves 77642 40 Mohawk 1/19/70 Mary Adams 98789 10 Brook Lane 6/3/64 Nancy Hopper 76543 82 Farm Hill 4/22/73 (There'd also be a lot of other names and info in this data set, but I would like to extract just the ones specified in the first smaller dataset created to do the advanced filter) How could I write the VB code to do this? Thanks. Matthew Kramer *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA question about selecting worksheets | Excel Discussion (Misc queries) | |||
selecting cells in different worksheets | Excel Discussion (Misc queries) | |||
Selecting and summing across worksheets | Excel Discussion (Misc queries) | |||
Selecting across worksheets | Excel Discussion (Misc queries) | |||
Selecting worksheets without hardcoding | Excel Programming |