VBA - Copy and paste cells from ranges from multiple sheets

Amateur_VBA

New Member
Joined
Jul 2, 2018
Messages
2
Hi all,

I am new to VBA with only basic knowledge of loops and have usually just substituted simple loop formulas with recorded macros. Therefore, please forgive me if this question is a stupid one. Currently, I created the following workbook:

RawData Sheets (7 of these. each with 2000 rows and 30 columns of numbers)
Calculation Sheet - using data from the 7 sheets, I Have a formula set up to calculate one number. (for example, A1 would be the calculated output number, while A2-A8 would have the input numbers from the raw data sheets)
OutputSheet - Blank right now, but in the end, I hope to have calculated numbers from the calculation sheet with 2000 rows and 30 columns

Basically, what I want to do is this: If my data starts in A1 in the raw data sheets, I want to copy A1 from each of the raw data sheets into the respective spots in the calculation sheet (a2-a8). My formula will then calculate and produce an output number. Then, I want to take this ouput number and paste it in Say A20 of the output sheet. I then want to repeat this for all 2000 rows and 30 columns.

The end result will be a 2000 row, 30column matrix of calculated values in my output sheet.

Now, I was thinking of using a "for each cell in a range" type of code to churn this out. However, I Have 7 pages worth of raw data and I have a different designated cell in the calculation sheet for each value taken from each. Therefore, I don't think that it would work out. Could someone please let me know if there's another type of code that would work for something like this? This probably requires something like nesting several loops in here but with my limited experience, I can't think of where to start.

Thanks!



 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top