T
TroyB
Hi,
I'm trying to convert all the cells in a column from hrs to mins. I've
writting the below email but it only converts all the numbers into 0 (zero).
What is wrong with the below macro? Is there an easier code?
Note: The info in the spreadsheet has been inserted from a *.csv file.
Could this be the problem?
Thank you for your assistance.
Regards
Troy
Sub HrsToMins()
Dim wkb As Workbook, i As Long, lngLastRow As Long, sht As Worksheet
Dim Hrs As Integer, Min As Integer
With ActiveSheet
lngLastRow = .Cells(Rows.Count, 19).End(xlUp).Row
For i = 20 To lngLastRow
Cells(i, 19).Value = Hrs
Min = Hrs * 60
Cells(i, 19).Value = Min
Next
End With
End Sub
I'm trying to convert all the cells in a column from hrs to mins. I've
writting the below email but it only converts all the numbers into 0 (zero).
What is wrong with the below macro? Is there an easier code?
Note: The info in the spreadsheet has been inserted from a *.csv file.
Could this be the problem?
Thank you for your assistance.
Regards
Troy
Sub HrsToMins()
Dim wkb As Workbook, i As Long, lngLastRow As Long, sht As Worksheet
Dim Hrs As Integer, Min As Integer
With ActiveSheet
lngLastRow = .Cells(Rows.Count, 19).End(xlUp).Row
For i = 20 To lngLastRow
Cells(i, 19).Value = Hrs
Min = Hrs * 60
Cells(i, 19).Value = Min
Next
End With
End Sub