Extract length of time and subtract from date/time cell value

RConner7

New Member
Joined
Mar 17, 2018
Messages
3
I’ve been struggling with how to start and get this done. I have a column that contains a length of time that could be worded like: 53 seconds ago, 2 hours ago, 1 minute ago. Then I have a column that has the date/time the data was extracted.

I need to be able to subtract the column that has the length of time “ago” from the date/time the data was extracted to give me the exact date/time the row was added.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I have a column that contains a length of time that could be worded like: 53 seconds ago, 2 hours ago, 1 minute ago.
Will the column ever have mixtures of those values? For example...

5 minutes and 24 seconds ago

1 hour and 43 minutes ago

2 hours, 15 minutes and 5 seconds ago

and so on.
 
Upvote 0
I've added some sample data to how it would look in the excel sheet. I would want to subtract the length of time within the 'SoldWhen' column from the Date/Time in the 'Time' column:

SoldWhenTime
Updated 13 seconds ago3/17/2018 11:00:12 AM
Updated 20 seconds ago3/17/2018 11:00:12 AM
Updated 22 seconds ago3/17/2018 11:00:12 AM
Updated 23 seconds ago3/17/2018 11:00:12 AM
Updated a minute ago3/17/2018 11:00:12 AM
Updated a minute ago3/17/2018 11:00:14 AM
Updated a minute ago3/17/2018 11:00:15 AM
Updated 2 minutes ago3/17/2018 11:00:15 AM
Updated 2 minutes ago3/17/2018 11:00:16 AM
Updated 2 minutes ago3/17/2018 11:00:16 AM
Updated 43 minutes ago3/17/2018 11:02:41 AM
Updated 43 minutes ago3/17/2018 11:02:42 AM
Updated 49 minutes ago3/17/2018 11:03:06 AM
Updated an hour ago3/17/2018 11:04:04 AM
Updated an hour ago3/17/2018 11:04:04 AM
Updated an hour ago3/17/2018 11:04:05 AM
Updated an hour ago3/17/2018 11:04:05 AM
Updated 2 hours ago3/17/2018 11:09:34 AM

<tbody>
</tbody>
 
Upvote 0
Or... how can I conver the cells in that column from “26 seconds” to 0:00:26 and “25 minutes” to 0:25:00. Maybe that’s somewhere to start.
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,256
Members
449,149
Latest member
mwdbActuary

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