Hi All
Using Excel 2007 and not wonderful with VBA (but hoping to get better!).
I am creating a spreadsheet to analyse data for AHT times and need the data in [h]:mm:ss format.
I have formatted the cells to this but when I paste the data in it is in seconds only. I know I have to divide by 86400 to fix this.
The data I am posting in would post into cell A4 and cover two rows a4:q4 & a5:q5.
I am wanting the macro to paste the data, and then divide only cells b5:m5 by 86400 - (in cell a1)
I have tried to do this myself, after a little digging on here, and have the following:
Sub Macro7()
'
' Macro7 Macro
'
'
Sheets("Raw Data").Select
Range("A4").Select
ActiveSheet.Paste
Range("A1").Select
Selection.Copy
Range("B4:M5").Select
Range("M5").Activate
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, SkipBlanks _
:=False, Transpose:=False
End Sub
But I get error 1004 - worksheet class failed.
I am hoping once I get this one sorted I can then repeat, with new data and new macro, to post in a7, a10, a13 etc down to a49.
Thanks
Using Excel 2007 and not wonderful with VBA (but hoping to get better!).
I am creating a spreadsheet to analyse data for AHT times and need the data in [h]:mm:ss format.
I have formatted the cells to this but when I paste the data in it is in seconds only. I know I have to divide by 86400 to fix this.
The data I am posting in would post into cell A4 and cover two rows a4:q4 & a5:q5.
I am wanting the macro to paste the data, and then divide only cells b5:m5 by 86400 - (in cell a1)
I have tried to do this myself, after a little digging on here, and have the following:
Sub Macro7()
'
' Macro7 Macro
'
'
Sheets("Raw Data").Select
Range("A4").Select
ActiveSheet.Paste
Range("A1").Select
Selection.Copy
Range("B4:M5").Select
Range("M5").Activate
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, SkipBlanks _
:=False, Transpose:=False
End Sub
But I get error 1004 - worksheet class failed.
I am hoping once I get this one sorted I can then repeat, with new data and new macro, to post in a7, a10, a13 etc down to a49.
Thanks