Extract and be able to sort from a text string

-emma-

Board Regular
Joined
Jul 14, 2006
Messages
180
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

Silly work and out dated systems have been causing me problems all day! We have a system that information is extracted from and the results are as below...

JohnSmith	Feb 22, '20 23:09	France	Manhattan	Offline	Verified
MR_Armstrong	Feb 09, '20 20:27	England	Brooklyn	Offline	Verified

What I need to be able to do is put this in some sort of manageable table. So I can filter, sort, extract etc. I've tried and managed to get some parts working, all be it messy, but the date is the thing that is stumping me the most. I can only ever get it to sort in Alpha order, no matter how I seem to format the cell.

Ideally, I would like to dump all the information in Tab 1 and Tab 2 spits out a pretty result.
Example of Tab 1 would be A2-A999 a dump of info as above
Example of Tab 2 would have headings of Name (A1), Date (B1), Location (C1) and Final Destination (D1) and the results in rows 2-999 extracted from Tab 1 data. (The rest of the information is not needed)

Please remember that I need to be able to sort on all things, especially Date.

Any help on this would be great.

Thanks
 
or
NameDateTimeLocDest
JohnSmith22/02/2020 23:09FranceManhattan
MR_Armstrong09/02/2020 20:27EnglandBrooklyn

Rich (BB code):
// Table2
let
    Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    BF = Table.AddColumn(Source, "Name", each Text.BeforeDelimiter([TEXT], " "), type text),
    BT1 = Table.AddColumn(BF, "DateTime", each Text.BetweenDelimiters([TEXT], " ", " ", 0, 3), type text),
    Type = Table.TransformColumnTypes(Table.ReplaceValue(BT1,"'","",Replacer.ReplaceText,{"DateTime"}),{{"DateTime", type datetime}}),
    BT2 = Table.AddColumn(Type, "Loc", each Text.BetweenDelimiters([TEXT], " ", " ", 4, 0), type text),
    BT3 = Table.AddColumn(BT2, "Dest", each Text.BetweenDelimiters([TEXT], " ", " ", 5, 0), type text),
    TSC = Table.SelectColumns(BT3,{"Name", "DateTime", "Loc", "Dest"})
in
    TSC
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,216,171
Messages
6,129,284
Members
449,498
Latest member
Lee_ray

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