Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have four arrays of variables in Sheet2 (A1:A10),
(B1:B10), (C1:C10), and (D1:D10). I would like to copy cell A1 (from Sheet2) to Sheet1 cell B2, cell B1 (from Sheet2) to Sheet1 cell B3, cell C1 (from Sheet2) to Sheet1 cell B4, and cell D1 (from Sheet2) to Sheet1 cell B5. After having copied-in these 4 values, the macro needs to record the value in Sheet1 cell B8 (which has been calculated based on a model with the values in cells B2:B5 as variables) and copy the result to Sheet2 cell E1, before repeating the process starting with row 2 in Sheet2, and repeat this process through row 10. I hope this makes sense, and I really appreciate any help I can get in solving this problem using a macro/VBA. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Tester13()
Dim cell As Range For Each cell In Worksheets("Sheet2") _ .Range("A1:A10") cell.Resize(1, 4).Copy With Worksheets("sheet1") .Range("B1").PasteSpecial Transpose:=True cell.Offset(0, 4).Value = .Range("B8").Value End With Next End Sub Worked for me. -- Regards, Tom Ogilvy Henrik wrote in message ... I have four arrays of variables in Sheet2 (A1:A10), (B1:B10), (C1:C10), and (D1:D10). I would like to copy cell A1 (from Sheet2) to Sheet1 cell B2, cell B1 (from Sheet2) to Sheet1 cell B3, cell C1 (from Sheet2) to Sheet1 cell B4, and cell D1 (from Sheet2) to Sheet1 cell B5. After having copied-in these 4 values, the macro needs to record the value in Sheet1 cell B8 (which has been calculated based on a model with the values in cells B2:B5 as variables) and copy the result to Sheet2 cell E1, before repeating the process starting with row 2 in Sheet2, and repeat this process through row 10. I hope this makes sense, and I really appreciate any help I can get in solving this problem using a macro/VBA. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I don't know which funaction is the right and how it's process | Excel Discussion (Misc queries) | |||
Stopping looped "Find" command | Excel Discussion (Misc queries) | |||
looped functions | Excel Discussion (Misc queries) | |||
Process Priority | Excel Discussion (Misc queries) | |||
If/then Process? | Excel Discussion (Misc queries) |