Hello,
I have some problem with synchronizing the VBA code from excel to work at access database.
This code erases the last star with any characters after the star. Example: This ID CODE - 63047450201*RO*Kolis*RBBG*LIM would become THIS 63047450201*RO*Kolis*RBBG
The problem is that I cant make it to work in access. My access database is similar to the excel data you can find in the attachment. The name of the column that needs to be changed is “Code ID”.
Here is the VBA code that I used for Excel:
Public Sub ProcessData()
Dim i As Long
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "C").End(xlUp).Row
For i = 2 To LastRow
.Cells(i, "C").Value2 = Left(.Cells(i, "C").Value2, InStrRev(.Cells(i, "C").Value2, "*") - 1)
Next i
End With
End Sub
Thanks for any help
Bookmarks