Forum

Notifications
Clear all

data cleansing

7 Posts
4 Users
0 Reactions
121 Views
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Hi Forum,

I have attached data and (legal Number) column will require a split.

as you can see they are not in order and text to column is not that helpful.

any tips to get them sorted.

Regards,

Aye

text-to-column.PNG

 
Posted : 20/02/2019 3:11 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Aye,

Please upload an Excel file containing a sample of your data with enough examples that cover every scenario, and show the desired result of the column split. From there we will be able to understand what you're trying to achieve.

Mynda

 
Posted : 20/02/2019 5:20 am
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Thanks, Mynda,

Please see attached excel file and my expected result.

 

Thank you.

Regards,

Aye

 
Posted : 20/02/2019 5:54 am
Philip Treacy
(@philipt)
Posts: 1631
Member Admin
 

Before I spend a lot of time on this, I have to ask, where does the data come from?  Can't you do something at the source of the data to prevent the invoice number and company name from being joined?

They key to this kind of problem is having the data in a consistent format and this isn't.  The invoice numbers take several different forms.

Regards

Phil

 
Posted : 20/02/2019 8:26 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Aye

You could try this but like Philip said above, it is best if the problem could be resolved at the source.

Sunny

 
Posted : 20/02/2019 10:02 am
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Many thanks, Sunny and Phil.

I will try to know the system as well.

Much appreciated for your kind help.

 

Regards,

Aye

 
Posted : 20/02/2019 6:09 pm
Philip Treacy
(@philipt)
Posts: 1631
Member Admin
 

Nice work Sunny.

Aye - attached is a VBA solution that uses RegEx in a UDF.  You'll need to set a reference to the 'Microsoft VBScript Regular Expressions 5.5' from the VBA editor.

As with Sunny's workbook, this doesn't work with the entry Programmed Health Professional #750246 because it's a different format to all the others.  This is what I meant by sorting out the formatting of the data at source.

Regards

Phil

 
Posted : 21/02/2019 2:45 am
Share: