October 5, 2010
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
VIP
Trusted Members
June 25, 2016
October 5, 2010
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
1 Guest(s)