Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Good day, unfortunately I discovered an additional Macro that will be created (PDF doesn't always save to Excel the way we hope).
I hope to have any text in Column D which has met the this criteria: Is six characters long wich can be alpa-numerica, intergers, or all letters. Part of the numbers/letter a "$" can occur. If this occurs in Column D, and E is blank, move that six digit alphanumeric/letter/intergers in to the adjacent blank cell.
I had been helped with the following Macro wihich I think is going in the right direction. Naturally the bit between "Select Case and End Select"
Thank you so much for reading this.
I hope to have any text in Column D which has met the this criteria: Is six characters long wich can be alpa-numerica, intergers, or all letters. Part of the numbers/letter a "$" can occur. If this occurs in Column D, and E is blank, move that six digit alphanumeric/letter/intergers in to the adjacent blank cell.
I had been helped with the following Macro wihich I think is going in the right direction. Naturally the bit between "Select Case and End Select"
Thank you so much for reading this.
VBA Code:
Public Sub MoveLetters()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Range("D2D" & Cells(Rows.Count, "D").End(xlUp).Row)
Select Case cell.Text
Case "A", "S", "L"
cell.Offset(0, 1) = cell.Text
cell.ClearContents
Case Else ' what to do if not R,S or L?
'If nothing, can eliminate these two lines
End Select
Next cell
Application.ScreenUpdating = True
End Sub