ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Append info in all worksheets in workbook in one sheet (https://www.excelbanter.com/excel-programming/348618-append-info-all-worksheets-workbook-one-sheet.html)

Barb Reinhardt

Append info in all worksheets in workbook in one sheet
 
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt

Ron de Bruin

Append info in all worksheets in workbook in one sheet
 
Hi Barb

Try
http://www.rondebruin.nl/copy2.htm

Or with formulas
http://www.rondebruin.nl/summary2.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt




Barb Reinhardt

Append info in all worksheets in workbook in one sheet
 
Ron,

I don't have a "MASTER" worksheet in the workbook and I'm getting a message
that it exists:

The first time I run through this

Debug.Print Len(ThisWorkbook.Worksheets.Item("Master").Name)
I get a value of 6

Suggestions?

Barb



"Ron de Bruin" wrote:

Hi Barb

Try
http://www.rondebruin.nl/copy2.htm

Or with formulas
http://www.rondebruin.nl/summary2.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt





Barb Reinhardt

Append info in all worksheets in workbook in one sheet
 
Oops, I see where it created the MASTER sheet. Never mind.

"Ron de Bruin" wrote:

Hi Barb

Try
http://www.rondebruin.nl/copy2.htm

Or with formulas
http://www.rondebruin.nl/summary2.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt





Barb Reinhardt

Append info in all worksheets in workbook in one sheet
 
Ron,

I've got this snippet of code

DestSh.Cells(Last + 1, "A").Value = sh.Name
DestSh.Range("A" & Last).Copy

Last1 = lastrow(DestSh)
- Range("A" & Last & ":" & "A" & Last1).Select

Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


I get Runtime error 1004
Method "Range" of object "_worksheet" failed

at the line with the arrow. What am I missing?

Thanks,
Barb

"Ron de Bruin" wrote:

Hi Barb

Try
http://www.rondebruin.nl/copy2.htm

Or with formulas
http://www.rondebruin.nl/summary2.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt





Ron de Bruin

Append info in all worksheets in workbook in one sheet
 
Hi Barb

Show me the complete macro that you use

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
Ron,

I've got this snippet of code

DestSh.Cells(Last + 1, "A").Value = sh.Name
DestSh.Range("A" & Last).Copy

Last1 = lastrow(DestSh)
- Range("A" & Last & ":" & "A" & Last1).Select

Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


I get Runtime error 1004
Method "Range" of object "_worksheet" failed

at the line with the arrow. What am I missing?

Thanks,
Barb

"Ron de Bruin" wrote:

Hi Barb

Try
http://www.rondebruin.nl/copy2.htm

Or with formulas
http://www.rondebruin.nl/summary2.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt







Barb Reinhardt

Append info in all worksheets in workbook in one sheet
 
I got it figured out. Thanks

"Ron de Bruin" wrote:

Hi Barb

Show me the complete macro that you use

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
Ron,

I've got this snippet of code

DestSh.Cells(Last + 1, "A").Value = sh.Name
DestSh.Range("A" & Last).Copy

Last1 = lastrow(DestSh)
- Range("A" & Last & ":" & "A" & Last1).Select

Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


I get Runtime error 1004
Method "Range" of object "_worksheet" failed

at the line with the arrow. What am I missing?

Thanks,
Barb

"Ron de Bruin" wrote:

Hi Barb

Try
http://www.rondebruin.nl/copy2.htm

Or with formulas
http://www.rondebruin.nl/summary2.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Barb Reinhardt" wrote in message
...
I have a workbook that has about 20 worksheets within it. I'd like to
append the information from each worksheet into one worksheet and in column
A, I'd like the name of the source worksheet to be displayed. I'm not sure
where to start.

Thanks in advance,
Barb Reinhardt








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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com