Posts

Showing posts from 2017

Use Excel to parse text to hours

I use a tool that displays elapsed time in the format of Xd Xh Xm, for days-hours-and minutes. If it's less than 1 day, then the output is Xh Xm. It's easy for me to scrape the output, but I need it in hours to manipulate it further. Example outputs and converted results: 2d 0h 18m = 48.3 (in hrs) 14h 9m = 14.15 (in hrs) I wrote an Excel function to accomplish this task. Assuming my output is in cell B3, this is the function. =IF( ISERROR (FIND("d",B3)),LEFT(B3,FIND("h",B3)-1)+(MID(B3,FIND(" ",B3,FIND("h",B3))+1,FIND("m",B3)-FIND(" ",B3,FIND("h",B3))-1)/60),( LEFT(B3,FIND("d",B3)-1) *24)+ MID(B3, FIND(" ",B3,FIND("d",B3))+1 ,FIND("h",B3)-FIND(" ",B3,FIND("d",B3))-1) +( MID(B3, FIND(" ",B3,FIND("h",B3))+1 ,FIND("m",B3)-FIND(" ",B3,FIND("h",B3))-1 )/60)) Notice it starts with an IF s

Is your Mac shutting down after it goes to sleep?

This eluded me for some time! Usually it didn't go all the way through the shut down, as there were files that needed saving. Either way, it was a pain getting going after my Mac was asleep. This is how I solved it. Go to System Preferences... > Security & Privacy Select the padlock in the lower-left. A user name/password dialog box will open. If you don't have the correct privileges for your Mac, you may be stuck at this point. Enter your user name and password. The padlock icon will change to an open padlock; The Advanced... button will no longer be grayed out/unaccessible. (See the image below.) Select the Advanced... button. Uncheck the box proceeding "Log out after _XX_ minutes of inactivity." Select OK Close the Security & Privacy preferences dialog box. That did solve the issue for me. I've heard from others that had similar issues, and what finally solved it for them was to make sure their hard disks didn't go to s