So I found this great code on another forum (author escapes me right now) and it looks for a word in column A for example, and assigns a chosen variable to the adjacent column. I'm trying to figure out how to adjust this macro so that it finds cells based on a manually selected range rather than a text input. So in example, it'll find numbers from a subset, and I can assign those numbers a variable.
Any help is much appreciated.
Sub Varassign()
Dim IB As String, IB1 As String
IB = InputBox("Enter word to find")
IB1 = InputBox("Enter word to paste next to")
Cells.Find(What:=IB, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Offset(0, 1).Copy Destination:=Cells.Find(What:=IB1, _
After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Offset(0, 1)
End Sub
Bookmarks