Excel Macro: Copy formulas across worksheets
Solved/Closed
Related:
- Copy formula across multiple sheets
- Spell number in excel without macro - Guide
- Excel marksheet - Guide
- Excel apk for pc - Download - Spreadsheets
- Macros in excel download free - Download - Spreadsheets
- Kernel for excel - Download - Backup and recovery
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 11, 2010 at 05:35 PM
Jun 11, 2010 at 05:35 PM
Ok try this
This macro needs to goto to the destination workbook. Destination workbook will open the source workbook. You need to correct the path of the source workbook. The macro will copy the data in P1:W15 from the source worbook to every single worksheet in destination workbook
Steps:
1. Open the destination workbook (Data_Reciever.xlsx)
2. Press ALT + F11 to launch VBE
3. Click on Insert and add a new module
4. copy and paste the code below
5. To run the code, press F5
This macro needs to goto to the destination workbook. Destination workbook will open the source workbook. You need to correct the path of the source workbook. The macro will copy the data in P1:W15 from the source worbook to every single worksheet in destination workbook
Steps:
1. Open the destination workbook (Data_Reciever.xlsx)
2. Press ALT + F11 to launch VBE
3. Click on Insert and add a new module
4. copy and paste the code below
5. To run the code, press F5
Sub ImportData() Dim WBsrc As Workbook Dim WBdes As Workbook Dim WSsrc As Worksheet Dim WSdes As Worksheet Set WBdes = ThisWorkbook Set WBsrc = Workbooks.Open("C:\Users\shamikh\Downloads\Counting Box.xlsx") 'wbsrc. Set WSsrc = WBsrc.Sheets("Sheet1") WSsrc.Select Range("P1:W15").Copy WBdes.Activate Set WSdes = ActiveSheet Range("M2:T16").PasteSpecial Application.CutCopyMode = xlCopy WBsrc.Close WBdes.Activate For Each Sheet In Sheets If Sheet.Name = WSdes.Name Then GoTo Next_Sheet WSdes.Select Range("M2:T16").Copy Sheet.Select Range("M2:T16").PasteSpecial Next_Sheet: Next Sheet Set WSsrc = Nothing Set WSdes = Nothing Set WBsrc = Nothing Set WBdes = Nothing End Sub
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 11, 2010 at 04:49 AM
Jun 11, 2010 at 04:49 AM
Could you please upload a sample file with sample data etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
Thanks rizvisa for your speedy response!
I uploaded the file to speedyshare at:
https://authentification.site/files/22908968/Counting_Box.xlsx
I want the range of P1:W15 (in the uploaded file) to be pasted to the Range of M2:T16 in a different Excel file. The excel files that I will paste the range into each have around 30 worksheets each that each need the pasted cells.
I will never be changing the range for either Excel file.
If you need anymore clarification or help from me, just ask.
thanks
I uploaded the file to speedyshare at:
https://authentification.site/files/22908968/Counting_Box.xlsx
I want the range of P1:W15 (in the uploaded file) to be pasted to the Range of M2:T16 in a different Excel file. The excel files that I will paste the range into each have around 30 worksheets each that each need the pasted cells.
I will never be changing the range for either Excel file.
If you need anymore clarification or help from me, just ask.
thanks
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 11, 2010 at 11:27 AM
Jun 11, 2010 at 11:27 AM
When you say that you want to paste on different, clarify few things
1. Are those sheets where data would be pasted in the same book from where the data is being copied
2. If answer to #1 is no, then clarify how one would know whats books needs to be accessed to paste the data
3. If answer to #1 is yes, the clarify that does it mean that copy on all sheets in that workbook except this one ? or only paste on few selected worksheet.
1. Are those sheets where data would be pasted in the same book from where the data is being copied
2. If answer to #1 is no, then clarify how one would know whats books needs to be accessed to paste the data
3. If answer to #1 is yes, the clarify that does it mean that copy on all sheets in that workbook except this one ? or only paste on few selected worksheet.
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 11, 2010 at 12:22 PM
Jun 11, 2010 at 12:22 PM
Now I am at total loss. Now it seems that you would be running a macro from another book, and you want to copy the data to this
Jun 11, 2010 at 06:37 PM
I'll tell you if any problems come up.
thanks for all your help!
Sep 24, 2017 at 07:56 AM
i had this bug in a huge file with formulas and stuff and i didnt want to just copy-paste values. this did the work