VBA: Delete/extract data between dates in a cell

NeoSez

Board Regular
Joined
Aug 14, 2020
Messages
153
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
I am wondering if it's possible to have VBA to delete fro one date to another.
For example, inside one cell, it will look like this:

10/01/2020
First line data.
10/02/2020
Second line data.
10/03/2020
Super line data.

For example Is it possible to delete, while everything else remains?
10/02/2020
Second line data.

Second question:
Is it possible to extract the date only for a line that says, for example Second line data?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
49,064
Office Version
  1. 365
Platform
  1. Windows
One example is not much to go on. What about 4 or 5 samples showing any variation you might have and put the desired results in the next column and post with XL2BB like you did before?
 

NeoSez

Board Regular
Joined
Aug 14, 2020
Messages
153
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hi Peter. Is it possible to delete any data above this line? So, in other words the date precedes the Status. Anything other text, I'm not concerned about. Just STATUS changes, I want.
09/22/2020
Status changed from OPEN to ADOPTED


Pet #Date ArivedStatusFlightDETAILSBreedDate AdoptedTimeUpdate Notes
1234561-JulOpenalphaAll Dogs are good boys 1pug11/02/2020 Team: itdy bitdy dpifrt 07/24/2020 Scheduled Date changed 06/25/2020 Requested
1234572-JulAdoptedbetaAll Dogs are good boys 2pit10/10/2020 Trying 09/22/2020 Status changed from OPEN to ADOPTED 08/25/2020 whatup 08/04/2020 sent 08/04/2020 I like candy
1234583-JulOpendeltaAll Dogs are good boys 3mixed11/02/2020 Dreams 08/05/2020 Do 07/24/2020 Come 07/15/2020 True
1234594-JulPENDINGalphaAll Dogs are good boys 4chihuahua12/03/2020 Chowdown 11/02/2020 Status changed from OPEN to PENDING 08/06/2020 Right 07/16/2020 Stuff 07/16/2020 Baby
1234605-JulAdoptedbetaAll Dogs are good boys 5mastif11/02/2020 Charlie 08/12/2020 Chocolate 07/24/2020 Factory 07/22/2020 Status changed from OPEN to ADOPTED
1234616-JulOpendeltaAll Dogs are good boys 6poodle12/03/2020 Andndoned 11/02/2020 EW 08/12/2020 bank 07/22/2020 DISPLAY 07/22/2020 bowed
 

Watch MrExcel Video

Forum statistics

Threads
1,132,644
Messages
5,654,552
Members
418,140
Latest member
ahepple86

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
Top