ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy cells & sheet name to master sheet (https://www.excelbanter.com/excel-programming/409851-copy-cells-sheet-name-master-sheet.html)

cottage6

Copy cells & sheet name to master sheet
 
Hello and HELP!
I need to copy some cells in various rows and also return the sheet name to
a master sheet where all will be layed out in a row. I'm running into
problems because some of the cells I need to get are merged and plus I don't
know what I'm doing anyway. I was able to get the sheet name back where I
needed it, but am unsure how to proceed with the rest without actually
selecting the master sheet and making that the active sheet. This is the
layout I've been given; cells C8, C10, C11, and C12 are merged. I need any
data after the : such as "Accounts Payable".
A8 C8
Application: Accounts Payable
A9 C9 D9
E9
Business Process: Purchase to Pay Business Sub-Process: All
F9 G9
Business Activity: Verify Batch
A10 C10
Lawson Sub-System: Accounts Payable
A11 C11
Test Number: AP520.1
A12 C12
Test Objective: Create a job for the Batch Release AP520.1
This is the code I have so far; please be kind to those more unfortunate
than you!
For Each Wks In ActiveWorkbook.Worksheets
With Wks
myName = ActiveSheet.Name
Range("C8").Copy
Range("C9").Copy
Sheets("Sheet1").Select
Range("a2").Select
ActiveCell = myName
Range("B2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End With
Next Wks


cottage6

Copy cells & sheet name to master sheet
 
Never mind; I've figured out most of what I need. Thanks.

"cottage6" wrote:

Hello and HELP!
I need to copy some cells in various rows and also return the sheet name to
a master sheet where all will be layed out in a row. I'm running into
problems because some of the cells I need to get are merged and plus I don't
know what I'm doing anyway. I was able to get the sheet name back where I
needed it, but am unsure how to proceed with the rest without actually
selecting the master sheet and making that the active sheet. This is the
layout I've been given; cells C8, C10, C11, and C12 are merged. I need any
data after the : such as "Accounts Payable".
A8 C8
Application: Accounts Payable
A9 C9 D9
E9
Business Process: Purchase to Pay Business Sub-Process: All
F9 G9
Business Activity: Verify Batch
A10 C10
Lawson Sub-System: Accounts Payable
A11 C11
Test Number: AP520.1
A12 C12
Test Objective: Create a job for the Batch Release AP520.1
This is the code I have so far; please be kind to those more unfortunate
than you!
For Each Wks In ActiveWorkbook.Worksheets
With Wks
myName = ActiveSheet.Name
Range("C8").Copy
Range("C9").Copy
Sheets("Sheet1").Select
Range("a2").Select
ActiveCell = myName
Range("B2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End With
Next Wks



All times are GMT +1. The time now is 10:20 PM.

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