excel 93 macros index match to display time of MAX result

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:cool:
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Good Morning - I think that is a good thing! Using "12-10-27.csv" the macro "maxtime" returns correct values. The power column on the other two files never exceeds the value of 1 and the macro fails. I have added "personal.xls" which contains the macros. It also includes "remrow" and "insrow" which I wrote to make Excel really useful.
 
Upvote 0
I still have the problem outlined in my previous post. Is the anyone out there who can help with this?
Any suggestions welcome!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,140
Messages
6,129,105
Members
449,486
Latest member
malcolmlyle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top