Hello!
I have the following task/problem. I have to set a master file with 3 sheets. The Sheet1 (Prediction) contains data as hours from a month so 720 to 744 hours. The task is :
1. To add to the Sheet2 (Energy 15-min Prediction) the value from every single cell from Sheet1 range from B6:B725 to Sheet2 cloned into every 4 cells. So basically to divide every single hour to 4 15min periods. Per example Sheet1 B6 have to go to Sheet2 B6:B9 cells wit the same value (S1 B6=10 ---> S2 B6:B9=10) and so on for the next 720 to 744 rows from S1 to be transferred to S2 B6:B2885.
2. The same main idea but this time the data in every Sheet4 (Power 15-min Prediction) group of 4 has to be divide to the corresponding cell from Sheet1; so er example S1 B6 ---> S4 B6:B9 every cell divided to the S1 B6 and so on S4 B10:B13 divided to S1 B7
I have started with some code, it is not complete at all, just an idea for me to solve the tasks. Otherwise i have to put it manually for both new sheets (Energy 15-min Prediction and Power 15-min Prediction)...
Here's my idea :
Sub Set_Cells()
Dim i As Long
With ActiveWorkbook
For i = 6 To 724 Step 4
.Sheets("Prediction").Cells(i, 4) = .Sheets("Energy 15-min Prediction").Cells(b6, b2880).Value
.Sheet"Prediction".Cells(i, 4) = "Energy 15-min Prediction".Cells(13, 31).Value
Next i
End With
End Sub
I have the following task/problem. I have to set a master file with 3 sheets. The Sheet1 (Prediction) contains data as hours from a month so 720 to 744 hours. The task is :
1. To add to the Sheet2 (Energy 15-min Prediction) the value from every single cell from Sheet1 range from B6:B725 to Sheet2 cloned into every 4 cells. So basically to divide every single hour to 4 15min periods. Per example Sheet1 B6 have to go to Sheet2 B6:B9 cells wit the same value (S1 B6=10 ---> S2 B6:B9=10) and so on for the next 720 to 744 rows from S1 to be transferred to S2 B6:B2885.
2. The same main idea but this time the data in every Sheet4 (Power 15-min Prediction) group of 4 has to be divide to the corresponding cell from Sheet1; so er example S1 B6 ---> S4 B6:B9 every cell divided to the S1 B6 and so on S4 B10:B13 divided to S1 B7
I have started with some code, it is not complete at all, just an idea for me to solve the tasks. Otherwise i have to put it manually for both new sheets (Energy 15-min Prediction and Power 15-min Prediction)...
Here's my idea :
Sub Set_Cells()
Dim i As Long
With ActiveWorkbook
For i = 6 To 724 Step 4
.Sheets("Prediction").Cells(i, 4) = .Sheets("Energy 15-min Prediction").Cells(b6, b2880).Value
.Sheet"Prediction".Cells(i, 4) = "Energy 15-min Prediction".Cells(13, 31).Value
Next i
End With
End Sub