Hi everyone,
I declare a variable as variant. The input for the variable are mostly strings and some scientific numbers. The Selection.Find keeps giving errors whenever it tries to find a scientific number. I formatted the data in the search row as "general". Below you can find part of the code:
Dim TradeID As Variant
Columns("B:B").Select
Selection.NumberFormat = "General"
Range("B4").Activate
Do While Not ActiveCell = Empty TradeID = ActiveCell
Columns("B:B").Select
Selection.Find(What:=TradeID, After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
Rows("4:4").Delete
Range("B4").Activate
Loop
If someone could help it would be much appreciated.
I declare a variable as variant. The input for the variable are mostly strings and some scientific numbers. The Selection.Find keeps giving errors whenever it tries to find a scientific number. I formatted the data in the search row as "general". Below you can find part of the code:
Dim TradeID As Variant
Columns("B:B").Select
Selection.NumberFormat = "General"
Range("B4").Activate
Do While Not ActiveCell = Empty TradeID = ActiveCell
Columns("B:B").Select
Selection.Find(What:=TradeID, After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
Rows("4:4").Delete
Range("B4").Activate
Loop
If someone could help it would be much appreciated.