i am trying to program a macro that i can use on a random value in one worksheet, and the macro is supposed to look for it in another worksheet, go 11 cells to the left and copy the Value in that cell back to the first worksheet, next to the random value.
my macro so far:
Sub Makro3()
Selection.Copy
Sheets("Messgeräte").Select
Cells.Find(What:=***thats where i dont know what to put***, After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext _
, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, -11).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lagermedien").Select
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
End Sub
please dont judge, i am new to this :)
the problem for me is that it is always new values and new cells. Otherwise i could just record a macro.
In the best case scenario this would work with more than one Value, means: the program looks for the random Value in the second worksheet and finds a couple of different cells that all have that very same Value and copies them to the first worksheet.