修复来自PDF信用额度的粘贴文本

我有从信用卡帐单复制的这个文本文件

示例行1:

August 18 August 18 Balance Conversion :02/06 4,671.30 

采样线2:

 August 1 August 2 *Php-Anytiefit-Ezypay Kuala Lumpur 2,300.00 

我从PDF文件复制到MS Excel文件。 我会得到下面的文字双空格,每行只是粘贴到一个像下面的单元格。

我尝试使用文本函数=RIGHT(B73,LEN(B73)-E73+2)和array =MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},B73&"0123456789"))等等。我从研究中得到的数组,但我仍然会调整公式,因为月份字符数字每个月都在变化,而单一或两位数的日子。

数量是固定的两位小数,使用逗号和点分隔符。 除非有一个分期付款额度,例如01/24,那么这个“二十四”中的一个就会比0 1 / 2 4 2 , 9 1 6 . 2 5 2,9 0 1 / 2 4 2 , 9 1 6 . 2 5更早出现在2,916.25之前0 1 / 2 4 2 , 9 1 6 . 2 5 0 1 / 2 4 2 , 9 1 6 . 2 5

我正在寻找使用VBA解决scheme或function来修复粘贴的值。

A ugust 1 8 A ugust 1 8 Power M ac C enter – G b 3:0 1/2 4 2,9 1 6。 2 5
u 1 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 0 2/0 6 4,6 7 1。 3 0
A ugust 1 A ugust 2 * P hp – nytimefit – E zypay K uala L umpur 2,3 0 0。 0 0
A ugust 1 3 A ugust 1 5 S tarbucks C c 2 7 5。 0 0

这是一些testing代码,通过在msWord中运行,将一个pdf文件的内容导入到excel中

 Sub pdf2excel() ' import pdf file text into excel, using msWord as a proxy ' set reference to microsoft word object library Dim wdApp As Word.Application Set wdApp = New Word.Application Dim file As String file = "C:\statements\statement.pdf" Dim wdDoc As Word.Document Set wdDoc = wdApp.Documents.Open( _ Filename:=file, ConfirmConversions:=False, _ ReadOnly:=True, AddToRecentFiles:=False, _ PasswordDocument:="", PasswordTemplate:="", Revert:=False, _ WritePasswordDocument:="", WritePasswordTemplate:="", _ Format:=wdOpenFormatAuto, XMLTransform:="") ' wdApp.Visible = false ' can make msWord visible if you want ... would help in determining location of data Dim cel As Range Set cel = Range("d2") ' put paragraph text in column D Dim prgf As Paragraph For Each prgf In wdDoc.Paragraphs cel = prgf.Range.Text ' put paragraph into worksheet cell Set cel = cel.offset(1) ' point to next cell down Next prgf Set cel = Range("b2") ' put word text in column D Dim wrd As Word.Range For Each wrd In wdDoc.Words cel = wrd.Text Set cel = cel.offset(1) Next wrd wdDoc.Close False Set wdDoc = Nothing wdApp.Quit Set wdApp = Nothing End Sub