The below code works well, and I do not necessarily need anything, but again, I've used the "Select" option in VBA, and was wondering how I could possibly remove the Select piece of this code. Like I said, it works fine and I have no problem with it, but if you have any suggestions on replacing Select I'd love to hear them. Thanks. (public dims were made for firstrow and lastrow, hence not shown here)
Code:
Sub findAndReplace()Dim newcol As String
Dim placecol As Double
' reset the variables to match the new formatted area.
firstrow = Cells(ActiveCell.Row, ActiveCell.Column).End(xlUp).Row
lastrow = Cells(firstrow, ActiveCell.Column).End(xlDown).Row
placecol = ActiveCell.Column
newcol = InputBox("Which column are we finding and replacing in?")
'select the column where the replacement will take place.
Columns(newcol & ":" & newcol).Select
'run the FOr loop through the new first row and last row. Will naturally start and end where the new rows are.
For icounter = firstrow To lastrow
Selection.Replace What:=Cells(icounter, placecol).Value, Replacement:=Cells(icounter, placecol + 1).Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Next icounter
End Sub