Changes

From Fellrnr.com, Running tips
Jump to: navigation, search

Excel Macros for pace

199 bytes removed, 11:11, 3 January 2012
m
no edit summary
2 If you don’t see a tab marked ‘developer’
http[[File://jfsavage.smugmug.com/photos/783147705_JdKMk783147705 JdKMk-O.jpg]]
2.1 Click on the round ‘window’ button in the very top left of the Excel window
http[[File://jfsavage.smugmug.com/photos/783147634_9aYsj783147634 9aYsj-O.jpg]]
2.2 Select ‘Excel Options’
http[[File://jfsavage.smugmug.com/photos/783147707_je8uM783147707 je8uM-O.jpg]]
2.3 Click on the ‘Popular’ and select the check box ‘Show developer tab in the Ribbon’
http[[File://jfsavage.smugmug.com/photos/783147634_9aYsj783147634 9aYsj-O.jpg]]
2.4 Click OK
3 Click on the developer tab in the ribbon
http[[File://jfsavage.smugmug.com/photos/783147705_JdKMk783147705 JdKMk-O.jpg]]
4 Click on the ‘Visual Basic’ button
http[[File://jfsavage.smugmug.com/photos/783147714_FvrH7783147714 FvrH7-O.jpg]]
5 Right click on the VBAProject, select insert, then module
http[[File://jfsavage.smugmug.com/photos/783141751_GX4AM783141751 GX4AM-O.jpg]]
6 Copy and paste the macros shown below into the text window. You can copy one, some or all of the macros.
http[[File://jfsavage.smugmug.com/photos/783147748_YD3UM783147748 YD3UM-O.jpg]]
7 Click on File, then ‘Close and return to Microsoft Excel’
Excel will interpret a pace as a time by default, so entering 7:00 will become 7:00:00 AM, which will mess things up. Enter any paces with a preceding quotation mark such as ‘7:00 to make it textual.
http[[File://jfsavage.smugmug.com/photos/783147754_WpFmi783147754 WpFmi-O.jpg]]
If you wanted to add five seconds per mile, use =S2MS(HMS2S(B2)+5)
http[[File://jfsavage.smugmug.com/photos/783147770_SoM3Q783147770 SoM3Q-O.jpg]]
==Saving a file with Macros==
To save an excel file that contains macros, you have to save it as a '.xslm' file.
http[[File://jfsavage.smugmug.com/photos/786106685_MJMUP786106685 MJMUP-O.jpg]]
==Loading a file containing macros==
If you do not enable the content, the macros will result in an Excel error '#NAME?'
http[[File://jfsavage.smugmug.com/photos/786107613_kSYvf786107613 kSYvf-O.jpg]]
==Troubleshooting==
If you get an error saying #VALUE? like this
http[[File://jfsavage.smugmug.com/photos/786110756_4dKCW786110756 4dKCW-O.jpg]]
The problem is probably that you have the wrong data type. In the case above, the macro S2MS (seconds to Minutes:Seconds) requires an integer number of seconds, not a 'minutes:seconds' value. Equally MS2S requires Minutes:Seconds to work correctly.
End Function
 
==Credits==
Many thanks to Mark E for his hard work in testing these macros and these instructions!
==See Also==
* [[Excel Training Log]]

Navigation menu