I may need your help again as i'm trying to build on the code that was previously suggested by another user here when I needed help on fill 2 dimension array from a vertical range of cell.
ISSUE: If you guys have noticed, the purpose of the above is just to extract out the data out directly from the SheetB and fill in SheetA B5 to M15. Now, I would like to bring a notch higher. Before i extract the value from SheetB, I would like to subtract the extracted the value with the corresponding cell in another column, say Z (which is fixed no matter which column of data im extracting initially)
It'll be something like that:
If SheetB's column A data is extracted:
Sheet A B5 = Sheet B A76 - Z76
Sheet A C5 = Sheet B A77 - Z77
Sheet A D5 = Sheet B A78 - Z78...
If SheetB's column B data is extracted:
Sheet A B5 = Sheet B B76 - Z76
Sheet A C5 = Sheet B B77 - Z77
Sheet A D5 = Sheet B B78 - Z78...
Hope you guys can help me once again.
Code:
Sub FillB5M15FromA76A197()
Dim R As Long
For R = 76 To 207 Step 12
Sheets("SheetA").Range("B5").Offset(Int((R - 76) / 12)).Resize(, 12) = Application.Transpose(Sheets("SheetB").Cells(R, Sheets("SheetA").Range("A1").Value).Resize(12))
Next
End Sub
ISSUE: If you guys have noticed, the purpose of the above is just to extract out the data out directly from the SheetB and fill in SheetA B5 to M15. Now, I would like to bring a notch higher. Before i extract the value from SheetB, I would like to subtract the extracted the value with the corresponding cell in another column, say Z (which is fixed no matter which column of data im extracting initially)
It'll be something like that:
If SheetB's column A data is extracted:
Sheet A B5 = Sheet B A76 - Z76
Sheet A C5 = Sheet B A77 - Z77
Sheet A D5 = Sheet B A78 - Z78...
If SheetB's column B data is extracted:
Sheet A B5 = Sheet B B76 - Z76
Sheet A C5 = Sheet B B77 - Z77
Sheet A D5 = Sheet B B78 - Z78...
Hope you guys can help me once again.