I have a replace function in a MACRo that works but would like to use Substitute. Can someone review and update to use Substitute?

BudZ 121 Reputation points

Range(Cells(2, 11), Cells(lastRow, lastCol)).Select ' Starting in row 2 and starting 11 rows over the H will be removed in any columns and rows after that through the end of those columns and rows
tmpErr = Err.Number
On Error Resume Next
Selection.Replace What:="h", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
tmpErr = Err.Number
On Error GoTo 0

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
2,175 questions
No comments
{count} votes