Re: Combining ranges in Excel
- From: "Bob Phillips" <bob.ngs@xxxxxxxxxxxxx>
- Date: Sun, 9 Jul 2006 12:38:08 +0100
Simon,
Does this help?
Sub ExtractData()
Dim shSummary As Work***
Dim sh As Work***
Dim iRow As Long
Dim iNext As Long
On Error Resume Next
Set shSummary = Worksheets("Summary")
On Error GoTo 0
If shSummary Is Nothing Then
Set shSummary = Worksheets.Add
shSummary.Name = "Summary"
End If
shSummary.Cells.ClearContents
iNext = 1
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> shSummary.Name Then
iRow = sh.Cells(sh.Rows.Count, "A").End(xlUp).Row
sh.Range("A1").Resize(iRow, 10).Copy _
shSummary.Cells(iNext, "A")
iNext = iNext + iRow
End If
Next sh
Set sh = Nothing
Set shSummary = Nothing
End Sub
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Sime" <me@xxxxxxxx> wrote in message
news:e8qhhk$llh$1$8302bc10@xxxxxxxxxxxxxxxxxxx
After wrestling with this for what seems like hours, I'm afraid I'mholding
admitting defeat and casting it before the collective minds of this group
for any hints!
What I have is a workbook containing around 50 worksheets, each one
a list of one particular customer's transactions (invoices and payments).a
What I need to do is construct a single list of all transactions
(automatically updated if possible, quick to manually update if not), so
that I can filter, summarize and pivot. My main problem is that my ***
names are the names of the customers (rather than Sheet1, Sheet2, etc.) so
if there is no quick method of doing this, I'll have to copy down formulas
and change *** names fifty times. Plus update the list every time I add
customer, which I'm trying to avoid.R1C1-style
I'm looking for things like transposing a 3d range to a 2d one, a
referencing method that works on 3d ranges, a way of pivotting a 3d range,
or any similar method. Even a clever little script would do!
Any thoughts on this would be *really* appreciated.
Many thanks, as ever.
Simon
.
- References:
- Combining ranges in Excel
- From: Sime
- Combining ranges in Excel
- Prev by Date: Combining ranges in Excel
- Next by Date: time***?
- Previous by thread: Combining ranges in Excel
- Next by thread: time***?
- Index(es):