Ron
The =INT(DOLLARFR(AS2*24,60)*100) works well - thank you. How would i
get it to run in a macro to convert all tha time data contained in two
separate columns AL:AL and AO:AO within an excel spreadsheet sheet.
Although it could be used in a macro, I wouldn't use that formula that way.
To use that formula, I would insert a column next to AL. I would then use that
formula in the column, and copy down. Do an Edit/Copy/Paste Special/Values to
replace the formula with the values, and then delete the unneeded column.
To use a macro, I would use a different formula and I would use the following
macro:
========================
Sub ConvertTime()
Dim c As Range
For Each c In Selection
If IsNumeric(c.Value) Then
c.Value = Int(c.Value * 24) * 100 + _
Int(60 * (c.Value * 24 - Int(c.Value * 24)))
c.NumberFormat = "0000"
End If
Next c
End Sub
=======================
Then you select the range that needs to be converted, and run the macro.
***Be sure to backup your data before doing this.***
It is certainly possible to use ATP functions in a VBA macro, but in this case,
it's easier to use a non-ATP requiring formula.
--ron