I searched and was unable to find something that fixed my problem so sorry if this is a repost.
I'm trying to create a macro that deletes the first part of a string in ever cell in a column. the format is Company:Part# and i want to delete the company name and colon and only leave the part# in the cell for every cell. i've gotten it to work using trim right function within a cell in excel but i need to do it in a macro. Right now i have this and it errors at the find function.
Sub test() cell = Worksheets(3).Cells(2, 2).Value cell = Trim(Right(Worksheets(3).Cells(2, 2), Len(Worksheets(3).Cells(2, 2)) - Find(":", Worksheets(3).Cells(2, 2)))) Worksheets(3).Cells(2, 2).Value = cell End Sub
Bookmarks