NEED EXCEL Function - Imported data needs to be converted from Text to Number

linwoodmwright
linwoodmwright used Ask the Experts™
on
I'm importing data from a SQL Server 2008 Standard DB to Excel 2010.
The Column I'm importing is varchar and I need a function to convert it to a number in Excel so that I can run an IF function.

I've tried a lot of functions, but nothing does the trick.




Thanks,
Linwood
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
NorieAnalyst Assistant

Commented:
There are various ways you could do it, without a formula.

Here's one.

Select a blank cell, select the data to be converted, goto Paste>Paste Speciall... and in the Operation section select Add(or Subtract).

Or you could convert it in SQL using CAST/CONVERT.

Author

Commented:
Thanks imnorie - This is a database connection, not a copy/paste import.  And, the data will be re-imported daily.

I cannot modify the SQL Server DB.
Analyst Assistant
Commented:
If you simply want to conver to a number in the IF use the double negative, eg --A2

Author

Commented:
hmm - I've never seen that one.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial