venturer2012
New Member
- Joined
- Apr 24, 2012
- Messages
- 9
sunny boy data. I have a macro to show maximum daily output but I am failing with the time of that max output. Here is the debugging dialogue:
Sub maxtime()
'
' maxtime Macro
' Macro recorded 23/04/2012 by mcd
'
' Keyboard Shortcut: Ctrl+q
'
Range("D154").Select
ActiveCell.FormulaR1C1 = "=MAX(R[-134]C[-1]:R[-34]C[-1])"
ActiveCell=INDEX($A10:$A120,MATCH(MAX($B10,$B20,B120),$B10:$B120,0)-2)
Selection.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
End Sub
It is the INDEX line which starts the debugger.
Any suggestions welcome
Sub maxtime()
'
' maxtime Macro
' Macro recorded 23/04/2012 by mcd
'
' Keyboard Shortcut: Ctrl+q
'
Range("D154").Select
ActiveCell.FormulaR1C1 = "=MAX(R[-134]C[-1]:R[-34]C[-1])"
ActiveCell=INDEX($A10:$A120,MATCH(MAX($B10,$B20,B120),$B10:$B120,0)-2)
Selection.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
End Sub
It is the INDEX line which starts the debugger.
Any suggestions welcome