Need to Reformat a Negative Time
Hello all!
Working on a bunch of data at work, and I've got most of the nuts cracked except this one. Because I'm trying to consolidate weeks worth of data and look for patterns, I've got a 14 page workbook.
My ultimate goal is to make this user friendly for others to use with only copying / pasting their data into the data sheets. The data that we're importing is bad. It's got multiple numbers and times stored as text. I've gotten them all to work (figured out how to copy a cell and select ranges of numbers and paste special multiply in VBA today, so that was cool!) except for one.
The cell is a difference in time, but I don't have the original numbers, so I can't even perform the calculations myself. I've just got a cell that says (for example) -00:08:37 for 8 minutes and 37 seconds under plan. When the cells are positive, I can multiply them by 1 then format them back to hh:mm:ss, but when they are negative this isn't working.
I could likely use some sort of a formula to break them down and turn them into a decimal, but like I said, I'm trying to make it where other users can paste data (up to 12 days of up to 200 rows x 25 columns) and then hit a macro button and have it fill / filter all the data for them.
As such, I'd really prefer to avoid using a second column to make this happen, and that's where I'm drawing a blank.
So what I'm hoping to do is use a VBA function of some sort to change -hh:mm:ss into -mm.ss or similar format, preferably within the same column. I've only seen one number where hh = 01, but it has happened. 99% of the time it's -00:mm:ss.
Excel 365 desktop in English.
I'm probably intermediate / advanced.
I'm already using macros in this workbook.
Thanks all!
[link] [comments]
Want to read more?
Check out the full article on the original site