So I am trying to create a spreadsheet that if a cell in the first sheet matches a cell in the second sheet, that it sends a value from the first sheet to another cell in the second. Here is what I have written and I have gone over it a hundred and I definitely missing something. I have been doing VBA for maybe a week so I am extremely new.
Sub findsomething()
Dim rng As Range
Dim refno As String
Dim rownumber As Long
refno = Sheet3.Cells(8, 6)
Set rng = Sheet2.Columns("A:A").Find(What:=refno, _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
rownumber = rng.Row
Sheet1.Cells(rownumber, 8).Value = Sheet3.Cells(29, 5).Value
End Sub
Sub findsomething()
Dim rng As Range
Dim refno As String
Dim rownumber As Long
refno = Sheet3.Cells(8, 6)
Set rng = Sheet2.Columns("A:A").Find(What:=refno, _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
rownumber = rng.Row
Sheet1.Cells(rownumber, 8).Value = Sheet3.Cells(29, 5).Value
End Sub