Kristina96
New Member
- Joined
- Sep 30, 2019
- Messages
- 33
Hello everyone,
I want to rearrange some data in an excel table.
I have a variable ID_Nr defined as double and it is a number between 2 and 100. I want the macro to look for that number in column A and if found select the whole row and delete it.
That way I am trying to eliminate all rows with a value that already appeared. It is supposed to keep only the first row with the entry "ID_Nr." in column A.
My tries lead to errors:
Thank you very much in advance for any kind of help!
Kristina
I want to rearrange some data in an excel table.
I have a variable ID_Nr defined as double and it is a number between 2 and 100. I want the macro to look for that number in column A and if found select the whole row and delete it.
That way I am trying to eliminate all rows with a value that already appeared. It is supposed to keep only the first row with the entry "ID_Nr." in column A.
My tries lead to errors:
VBA Code:
Cells(1, 1).Select
Cells.Find(What:="ID_Nr.", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCells.Rows.Select
Selection.Delete
Thank you very much in advance for any kind of help!
Kristina