CodePudding user response:
Cell change eventsCodePudding user response:
Data extraction, operators recognition, function composition calculation,CodePudding user response:
Can increase the processing method in Sheet Change events:
Option Explicit
'there's a problem, is the time when the input subtration Excel automatically as the date processing.
Private Sub Worksheet_Change (ByVal Target As Range)
Dim reg As Object
The Set reg=CreateObject (" vbscript. Regexp ")
Reg. The Pattern="\ d + + \ [- */] \ d +"
Then If reg. Test (Target Text)
Cells (Target. Row, Target. The Column + 1)=the Evaluate (Target. The Text)
End the If
End Sub
Run the example:
Download address:
Link: https://pan.baidu.com/s/1mzx1hklZHInDCQywXsmYbA
The extracted code: v3k2