Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default combining spreadsheet tabs

Hello:

I have a spreadsheet of about 30 tabs. Each tab contains a different number
of rows but the same number of columns (four columns).

Is it possible to combine these tabs into one spreadsheet with four columns?
Probably not, but I thought that I would check with you all out in
cyberspace.

Thanks!

childofthe1980s
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default combining spreadsheet tabs

To do it in code is fairly straight forward, but to do it via formula is not
going to work too well for you. If you wnat some code just RSVP...
--
HTH...

Jim Thomlinson


"childothe1980s" wrote:

Hello:

I have a spreadsheet of about 30 tabs. Each tab contains a different number
of rows but the same number of columns (four columns).

Is it possible to combine these tabs into one spreadsheet with four columns?
Probably not, but I thought that I would check with you all out in
cyberspace.

Thanks!

childofthe1980s

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default combining spreadsheet tabs

VBA would be simple.

Sub Test()
Dim iLastRow As Long
Dim i As Long

i = 1
For Each sh In ThisWorkbook.Worksheets
If sh.Name < "Master" Then
iLastRow = sh.Cells(shRows.Count, "A").End(xlUp).Row
sh.Range("A1").Resize(iLastRow, 4).Copy _
Worksheets("Master").Cells(i, "A")
i = i + iLastRow
End If
Next sh

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"childothe1980s" wrote in message
...
Hello:

I have a spreadsheet of about 30 tabs. Each tab contains a different

number
of rows but the same number of columns (four columns).

Is it possible to combine these tabs into one spreadsheet with four

columns?
Probably not, but I thought that I would check with you all out in
cyberspace.

Thanks!

childofthe1980s



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default combining spreadsheet tabs

Here is the code if you need it... It assumes that on all 30 tabs the A
column will be populated to the last row of data...

Sub MakeOneSheet()
Dim wksNew As Worksheet
Dim wks As Worksheet

Set wksNew = Worksheets.Add

For Each wks In Worksheets
With wks
If .Name < wksNew.Name Then
.Range(.Range("D1"), .Cells(Rows.Count, "A").End(xlUp)).Copy _
Destination:=wksNew.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
End If
End With
Next wks
End Sub
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

To do it in code is fairly straight forward, but to do it via formula is not
going to work too well for you. If you wnat some code just RSVP...
--
HTH...

Jim Thomlinson


"childothe1980s" wrote:

Hello:

I have a spreadsheet of about 30 tabs. Each tab contains a different number
of rows but the same number of columns (four columns).

Is it possible to combine these tabs into one spreadsheet with four columns?
Probably not, but I thought that I would check with you all out in
cyberspace.

Thanks!

childofthe1980s

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
Combining all tabs into 1 master w/o copy&paste Webs Excel Worksheet Functions 1 March 6th 09 12:29 AM
Combining information from multiple tabs [email protected] Excel Worksheet Functions 10 July 19th 06 07:18 PM
Combining multiple tabs into one. [email protected] Excel Discussion (Misc queries) 1 July 19th 06 07:15 PM
Combining Data multiple tabs zero760 Excel Discussion (Misc queries) 2 August 30th 05 11:00 PM
combining tabs in one master tab TeachMeExcel Excel Discussion (Misc queries) 1 March 31st 05 05:59 AM


All times are GMT +1. The time now is 07:24 PM.

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

About Us

"It's about Microsoft Excel"