Strip out unwanted data from cell

DavidAC

Board Regular
Joined
Feb 10, 2003
Messages
134
Office Version
  1. 365
good morning,
I have a spreadsheet with circa 10K of rows. one of the cells contains data which needs to be stripped out to only leave the required readable data. The field currently contains a lot unnecessary data

"We're coming to fit your property tomorrow morning. Your appointment slot is between {{"date":{"inputValue":"12/4/2018 8:00:00 AM","requestedFormat":"HH:mm","inputValueFormat":"MM/DD/YYYY hh:mm:ss a"}}} and {{"date":{"inputValue":"12/4/2018 12:00:00 PM","requestedFormat":"HH:mm","inputValueFormat":"MM/DD/YYYY hh:mm:ss a"}}} but we should arrive between {{"date":{"inputValue":"12/4/2018 10:56:00 AM","requestedFormat":"HH:mm","inputValueFormat":"MM/DD/YYYY hh:mm:ss a"}}} and {{"date":{"inputValue":"12/4/2018 11:27:00 AM","requestedFormat":"HH:mm","inputValueFormat":"MM/DD/YYYY hh:mm:ss a"}}}.

it should read as follows

"We're coming to fit your property tomorrow morning. Your appointment slot is between 12/4/2018 8:00:00 AM", and ":"12/4/2018 12:00:00 PM but we should arrive between 12/4/2018 10:56:00 AM"," and 12/4/2018 11:27:00 AM."

any help is appreciated?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try running this, changing sheet name to suit:

Code:
Dim sh As Worksheet, arr, i As Long

Set sh = Sheets("Sheet2")
arr = Array("{{""date"":{""inputValue"":""", """,""requestedFormat"":""HH:mm"",""inputValueFormat"":""MM/DD/YYYY hh:mm:ss a""}}}")

For i = LBound(arr) To UBound(arr)
    sh.Cells.Replace What:=arr(i), Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Next
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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