PC Review


Reply
Thread Tools Rate Thread

Consolidate by range names which represent worksheet tab names

 
 
Wally
Guest
Posts: n/a
 
      14th Jul 2010
I would like consolidate by range names, which most often is the tab
names, with the exception if the tab name starts with a number (ie. -
35Wil would have a range name of _35Wil)

My first range and sheet name is always Total and the last is the
sheet before IncStmt.

There can be anywhere between one and 12 worksheet tabs.

TIA

Gerry
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      14th Jul 2010
Give more details of what you have and what you want to achieve.

Pete

On Jul 14, 4:30*pm, Wally <gerrywald...@gmail.com> wrote:
> I would like consolidate by range names, which most often is the tab
> names, with the exception if the tab name starts with a number (ie. -
> 35Wil would have a range name of _35Wil)
>
> My first range and sheet name is always Total and the last is the
> sheet before IncStmt.
>
> There can be anywhere between one and 12 worksheet tabs.
>
> TIA
>
> Gerry


 
Reply With Quote
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      14th Jul 2010
On Jul 14, 11:28*am, Pete_UK <pashu...@auditel.net> wrote:
> Give more details of what you have and what you want to achieve.
>
> Pete
>
> On Jul 14, 4:30*pm, Wally <gerrywald...@gmail.com> wrote:
>
>
>
> > I would like consolidate by range names, which most often is the tab
> > names, with the exception if the tab name starts with a number (ie. -
> > 35Wil would have a range name of _35Wil)

>
> > My first range and sheet name is always Total and the last is the
> > sheet before IncStmt.

>
> > There can be anywhere between one and 12 worksheet tabs.

>
> > TIA

>
> > Gerry- Hide quoted text -

>
> - Show quoted text -


"If desired, send your file to dguillett @gmail.com I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."
 
Reply With Quote
 
Wally
Guest
Posts: n/a
 
      14th Jul 2010
On Jul 14, 12:28*pm, Pete_UK <pashu...@auditel.net> wrote:
> Give more details of what you have and what you want to achieve.
>
> Pete
>

Hi Pete

What I have in this case is three worksheets, named; Total, 101Finance
and Rental_AllCan. I have named a range in each worksheet to
correspond with the worksheet tab name. On worksheet Total there's a
range B4:Z126 named Total, on 101Finance there's a range B4:Z179 named
_101Finance and so on. After Rental_AllCan worksheet there is a
worksheet named IncStmt.

I may add or delete worksheets between Total and IncStmt and I am
trying to find a way so that I do not have to keep rewriting the macro
each time a worksheet is added or deleted.

This is what I currently have.

Selection.Consolidate Sources:=Array( _
"Total", _
"_101Finance", _
"StarlingSt",_
"Rental_AllCan"), _
Function:=xlSum, TopRow:=False, LeftColumn:=True, CreateLinks:=False

I have 12 different companies with a different macro for each because
they all have different worksheets(dept names). I was hoping to write
one macro for all. Like I said in the previous post, there may only
be the Total page and other companies could have up to 12 worksheets.

If it's still not clear I can upload a partial workbook.

Thanks again

Gerry
 
Reply With Quote
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      14th Jul 2010
On Jul 14, 1:05*pm, Wally <gerrywald...@gmail.com> wrote:
> On Jul 14, 12:28*pm, Pete_UK <pashu...@auditel.net> wrote:> Give more details of what you have and what you want to achieve.
>
> > Pete

>
> Hi Pete
>
> What I have in this case is three worksheets, named; Total, 101Finance
> and Rental_AllCan. *I have named a range in each worksheet to
> correspond with the worksheet tab name. *On worksheet Total there's a
> range B4:Z126 named Total, on 101Finance there's a range B4:Z179 named
> _101Finance and so on. *After Rental_AllCan worksheet there is a
> worksheet named IncStmt.
>
> I may add or delete worksheets between Total and IncStmt and I am
> trying to find a way so that I do not have to keep rewriting the macro
> each time a worksheet is added or deleted.
>
> This is what I currently have.
>
> Selection.Consolidate Sources:=Array( _
> * * * * "Total", _
> * * * * "_101Finance", _
> * * * * "StarlingSt",_
> * * * * "Rental_AllCan"), _
> Function:=xlSum, TopRow:=False, LeftColumn:=True, CreateLinks:=False
>
> *I have 12 different companies with a different macro for each because
> they all have different worksheets(dept names). *I was hoping to write
> one macro for all. *Like I said in the previous post, there may only
> be the Total page and other companies could have up to 12 worksheets.
>
> If it's still not clear I can upload a partial workbook.
>
> Thanks again
>
> Gerry


Try this idea or send me the file as I suggested earlier

option explicit
Sub midsheets()
dim i as long
For i = 2 To Sheets.Count - 1
MsgBox Sheets(i).Name
Next i
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do I list all range names in a worksheet =?Utf-8?B?UXVpZXRNYW4=?= Microsoft Excel Programming 3 28th Sep 2007 07:21 PM
Duplicate Range Names by worksheet FlaAl Microsoft Excel Misc 0 24th May 2006 05:14 PM
Defining worksheet specific range names =?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?= Microsoft Excel Programming 2 17th Jan 2006 03:46 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie Microsoft Excel Programming 2 22nd Sep 2004 03:30 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie Microsoft Excel Programming 0 22nd Sep 2004 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:36 AM.