Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert text to numbers?

Tags:

I have an Excel report which contains several columns of text and several columns of numbers which are stored as text.

Is there an easy way to convert those numbers that are stored as text to numbers, without affecting the actual text data?

like image 688
sds Avatar asked Apr 30 '10 02:04

sds


2 Answers

I find that the easiest and quickest way to convert "numbers stored as text" into numeric numbers is

  1. Select any blank cell
  2. Copy that cell (Ctrl+C)
  3. Select the range which contains the data you want to convert (it's OK if the range includes nonnumeric data as well)
  4. Use "Paste Special" with operation "add" (I guess "subtract" would work too)

Besides being quick, this has the advantage of converting in-place.

"Paste Special" is in the Edit menu of "classic" versions of Excel (2003 and earlier), or in the Clipboard section of the Home tab of "ribbon" versions of Excel (2007+).

like image 116
John Y Avatar answered Oct 17 '22 02:10

John Y


Use the VALUE function if you just want that text as a number in a different cell.

like image 41
Daniel DiPaolo Avatar answered Oct 17 '22 02:10

Daniel DiPaolo