I got this formula and it does everything I need it to, except bringing with it the format of the cell it is copying from to the target cell.
I need the formula to also convert the target cell with the cell format (in this case currency) it gets from the first cell.
The question is regarding only the first formula, not the one in the bottom.
Also asked here Need help to transfer values with currency cells
I need the formula to also convert the target cell with the cell format (in this case currency) it gets from the first cell.
The question is regarding only the first formula, not the one in the bottom.
Also asked here Need help to transfer values with currency cells
VBA Code:
Option Explicit
Sub sMoveValues()
Dim i As Long
Application.ScreenUpdating = False
With Sheets("Testark")
'18,22
For i = 1 To 12
.Cells(18, 10 * (i - 1) + 9).Resize(22, 1).Value = _
.Cells(18, 10 * (i - 1) + 10).Resize(22, 1).Value
Next
'58,43
For i = 1 To 12
.Cells(58, 10 * (i - 1) + 9).Resize(43, 1).Value = _
.Cells(58, 10 * (i - 1) + 10).Resize(43, 1).Value
Next
'114, 211
For i = 1 To 12
.Cells(114, 10 * (i - 1) + 9).Resize(211, 1).Value = _
.Cells(114, 10 * (i - 1) + 10).Resize(211, 1).Value
Next
End With
Application.ScreenUpdating = True
End Sub
Sub sMoveValues_Original()
Dim i As Long
Application.ScreenUpdating = False
With Sheets("Ark1")
For i = 1 To 36
.Cells(2, 5 * (i - 1) + 2).Resize(42, 1).Value = _
.Cells(2, 5 * (i - 1) + 3).Resize(42, 1).Value
Next
End With
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: