VBA trying to compare number as text to number, must convert

Having an issue with a very large spreadsheet where some numbers are formatted as text and som values are strings.  Trying to cycle thru 1st sheet one row at a time and comparing these cells to values on the second sheet so I can do some logic in a vba routine.

The issue is that out of the 800,000 rows of data, over 100,000 are not comparing properly because numbers formatted as text in the first sheet are not "equal" to the numbers in the second sheet.

I was going to try to convert everything to a string like:
If  STR(sheet1.cells(r,c) = STR(sheet2.cells(s,d)) then....

but then I get errors because some cells actually contain strings...and trying to make a string... a string ....gave me an error.

so, not sure how to do this.  wanted to just test if it's a string and if not, make it a string.  I think that would work.  any ideas?

here are some of the things I am trying to work with and am having trouble comparing due to formats:

W1011223
4544556
3433454 (as text)


ohmetwAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JeewsCommented:
Try IsNumeric() to check before convertion
JeewsCommented:
Even TypeName() can be used
VipulKadiaCommented:
Try this one :

If  CStr(sheet1.cells(r,c)) = CStr(sheet2.cells(s,d)) then
  msgbox "Same Value"
End IF

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.