Selection.Find not finding number with scientific number

Hermanie

Board Regular
Joined
Nov 28, 2016
Messages
56
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.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top