Hello,
I have a query regarding a VBA output I am getting.
I am using following VBA to calculate some revenues. Pardon my coding skills if they are bad since I am learning using lot of forums and videos.
Code:
Sub revcalc_US()
Application.ScreenUpdating = False
ThisWorkbook.Worksheets("Rev_cal_WIP").Range("US_clr").ClearContents
Dim i As Long
Dim rng As Range
Dim rng1 As Range
For i = 1 To Worksheets("Rev Calc").Range("B10").Value
Set rng = Worksheets("Rev Calc").Range("Newrev")
Set rng1 = Worksheets("Control").Range("X4:Z4").Offset((1 * i) - 1, 0)
Range("rgn").Resize(rng1.Rows.Count, rng1.Columns.Count).Value = rng1.Cells.Value
Range("USrevPaste").Offset((20 * i) - 20, 0).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Cells.Value
Next i
Application.ScreenUpdating = True
End Sub
The output I am getting as a result of the orange highlighted code is only till 2 decimals. (Like $ 26.23). I would like it to be till at least 8 decimals.
Can you suggest a tweak in the code or is there anything I am missing to add in the code?
Help is needed and is highly appreciated.
Thanks
Sumant
I have a query regarding a VBA output I am getting.
I am using following VBA to calculate some revenues. Pardon my coding skills if they are bad since I am learning using lot of forums and videos.
Code:
Sub revcalc_US()
Application.ScreenUpdating = False
ThisWorkbook.Worksheets("Rev_cal_WIP").Range("US_clr").ClearContents
Dim i As Long
Dim rng As Range
Dim rng1 As Range
For i = 1 To Worksheets("Rev Calc").Range("B10").Value
Set rng = Worksheets("Rev Calc").Range("Newrev")
Set rng1 = Worksheets("Control").Range("X4:Z4").Offset((1 * i) - 1, 0)
Range("rgn").Resize(rng1.Rows.Count, rng1.Columns.Count).Value = rng1.Cells.Value
Range("USrevPaste").Offset((20 * i) - 20, 0).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Cells.Value
Next i
Application.ScreenUpdating = True
End Sub
The output I am getting as a result of the orange highlighted code is only till 2 decimals. (Like $ 26.23). I would like it to be till at least 8 decimals.
Can you suggest a tweak in the code or is there anything I am missing to add in the code?
Help is needed and is highly appreciated.
Thanks
Sumant