#1   Report Post  
Posted to microsoft.public.excel.misc
brianTmcnamara
 
Posts: n/a
Default Worksheet question

will excel recognize a [ 'Sheet 1' + 1 ] command if I'm trying to have a
macro move through worksheets that are not necessarily sequential but list
numbered within a given range?

Ultimately, I'm looking to return values across a range (225+) of worksheets
wherein the cells A4:A325 are the same (but with a different corresponding
Column B) TO A NEW WORKSHEET. Any suggestions? thanks.

-Brian
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Worksheet question

Not sure I'm following the thread properly, but see if this applies.
You might see this line in a VBA routine:
Sheets("Sheet1").Select

In a For...Next situation, where variable K is an incremental counter,
you might see this:
Sheets("Sheet" & K).Select
or
Sheets("Sheet" & K+1).Select

So what you're looking for is possible, but I'm not sure I follow the
exact application you have. Are you trying to summarize range A4:A325
from 225 worksheets on a single sheet?

  #3   Report Post  
Posted to microsoft.public.excel.misc
brianTmcnamara
 
Posts: n/a
Default Worksheet question

Dave O,

Thanks for the response.

Actually, what I'm trying to do is run through a range of worksheets (each
worksheet = an account number) and return a cell unique to each worksheet AND
various cells repeated on each worksheet (think object codes for a given
account number wherein each unique account number can have values for a
series of object codes) to ease an upload batch. I'd love to automate a
process that runs through the range of worksheets (not necessarily
consecutive but definitely in sequence). If I follow your suggestion
variable K counter, does the sequence of the worksheets matter if one is
12345, the second is 12346 and the third is 98765? Unfortunately, there's no
rhyme or reason to the sequence.

Thanks for your input.

-Brian
"Dave O" wrote:

Not sure I'm following the thread properly, but see if this applies.
You might see this line in a VBA routine:
Sheets("Sheet1").Select

In a For...Next situation, where variable K is an incremental counter,
you might see this:
Sheets("Sheet" & K).Select
or
Sheets("Sheet" & K+1).Select

So what you're looking for is possible, but I'm not sure I follow the
exact application you have. Are you trying to summarize range A4:A325
from 225 worksheets on a single sheet?


  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Worksheet question

If the account numbers are not consecutive then using a counter would
not work. Probably the most intuitive way to do this is to create a
new tab in the workbook called something like "Batch Process", and then
list all the tabs you want to include in the batch. So if column
A1:A10 was the list of accounts for this batch, you could write code to
start at A1 and loop through A10. (Or you could write it to loop until
the code encountered a blank cell.)

I can't tell from your description if the data you need is *always* in
cell B52 (for instance) on each tab, or if it will vary from tab to
tab. On your Batch Process tab you could include information in
columns to the right of each that indicates what cell(s) to pick up.

  #5   Report Post  
Posted to microsoft.public.excel.misc
brianTmcnamara
 
Posts: n/a
Default Worksheet question

Dave,

that is a good idea but one that relies too heavily on the maintenance of
this master list. Since this is for a model that then gets passed off to
different department heads who can then add a new account number at their
leisure I'm not sure this is the best to go. Especially since this
"implementation" is already underway. I suspose if we had started out this
way it MAY have been doable.
To answer you question, every Account number worksheet has the same layout
save one cell.

Any other direction you can think of? Even if I can't roll it out this year
I'd attempt to modify the existing model so that next year's upload is that
much easier..Thanks.

-Brian


"Dave O" wrote:

If the account numbers are not consecutive then using a counter would
not work. Probably the most intuitive way to do this is to create a
new tab in the workbook called something like "Batch Process", and then
list all the tabs you want to include in the batch. So if column
A1:A10 was the list of accounts for this batch, you could write code to
start at A1 and loop through A10. (Or you could write it to loop until
the code encountered a blank cell.)

I can't tell from your description if the data you need is *always* in
cell B52 (for instance) on each tab, or if it will vary from tab to
tab. On your Batch Process tab you could include information in
columns to the right of each that indicates what cell(s) to pick up.




  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Worksheet question

The only other way would involve hardcoding the routine with specific
data. The list of account numbers I talked about is meant to allow
scaleability and adaptability: if one dept head wants to delete all
except his own set of accounts, then he may do that at his discretion.

Anyway, that's how I would do it. But that's just me, Mr. Vegas.

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
Customizing Worksheet Menu Bar question. Help! [email protected] Excel Discussion (Misc queries) 0 October 26th 05 02:28 PM
advanced: synchronizing data value across two worksheet drop boxes mdhokie Excel Worksheet Functions 1 October 6th 05 08:46 PM
Copy worksheet question Greegan Excel Worksheet Functions 4 August 1st 05 06:43 AM
Question about sorting in protected worksheet SJC Excel Worksheet Functions 6 March 24th 05 10:35 PM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


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

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"