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)
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!
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!