Need help to transfer values with currency cells

Tirrazo

New Member
Joined
May 19, 2022
Messages
19
Office Version
  1. 365
Platform
  1. Windows
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

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:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Ark 27.02.23.xlsm
CDEFGHIJKLMNOPQRSTUVWXYZ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
1811
1911
2011
2111
2211
2311
2411
2511
2611
2711
2811
2911
3011
3111
3211
3311
3411
3511
3611
3711
3811
3911
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Ark
Cells with Conditional Formatting
CellConditionCell FormatStop If True
Y114:Y288,AI114:AI288,AS114:AS288,BC114:BC288,BM114:BM288,BW114:BW288,CG114:CG288,CQ114:CQ288,DA114:DA288,DK114:DK288,DU114:DU288,O114:O288,Y290:Y324,AI290:AI324,AS290:AS324,BC290:BC324,BM290:BM324,BW290:BW324,CG290:CG324,CQ290:CQ324,DA290:DA324,DK290:DK324Cell Value>0textNO
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,513
Members
448,967
Latest member
screechyboy79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top