# Help with Excel number conversion?

**URL:** <https://boards.straightdope.com/t/help-with-excel-number-conversion/614810>\
**Category:** Factual Questions\
**Created:** [March 5, 2012, 1:22pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810 "2012-03-05T13:22:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wheelz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wheelz/32/5718_2.png) [@Wheelz](https://boards.straightdope.com/u/Wheelz)\
**Post date:** [March 5, 2012, 1:22pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/1 "2012-03-05T13:22:08Z")

</div>

I’m working on a project at work in which I will be receiving stats from a third party via e-mail. That is, the information is in the actual body of the e-mail, not an attachment. I’ve asked if the info can be sent via spreadsheet, but have been told no, this is what I’m getting. It looks something like this:

> [@](#):
>
> …Transaction #… Amount($) …QUANTITY … TRANS\_DATE  
> 1 … 300430 … 0.4 … 15.527000 … 2012-02-17 9:50:46 AM  
> 2 … 300456 … 0.09 … 11.901000 … 2012-02-1 7 10:38:01 AM  
> 3 … 300738 … 0.03 … 15.249000 … 2012-02-17 5:53:51 PM  
> 4 … 300754 … 0.02 … 7.757000 … 2012-02-17 6:36:44 PM  
> 5 … 300783 … 0.01 … 6.806000 … 2012-02-17 7:47:26 PM  
> 6 … 300668 … 0.02 … 10.350000 … 2012-02-17 4:19:51 PM

(The dots are not there. I added them to separate the columns for this example.) What I need to do is multiply the dollar amount by the quantity and total the whole thing. I copy and paste the table into a spreadsheet, and I know how to separate it into columns. A couple of quick and easy formulas and I should be good to go, right? Except the numbers aren’t numbers, they’re text. OK, I know there’s a way to convert text into numbers, I’ll just use “Help” to find it.

> [@](#):
>
> On the Tools menu, click Options.  
> On the Error Checking tab, make sure that the Enable background error checking check box and the Number stored as text check box are both selected, and then click OK.

Done and done.

> [@](#):
>
> On the worksheet, select any single cell or range of adjacent cells that has an error indicator in the upper-left corner.  
> Next to the selected cell or range of cells, click the error button that appears , and then click Convert to Number.

Oh, Okay. Sounds easy enough. Except, wait, there are no error indicators.

> [@](#):
>
> Numbers that are formatted as text are left-aligned instead of right-aligned in the cell.

They are; plus, I can’t sum them or anything else, so I know they are indeed formatted as text.

> [@](#):
>
> With error checking turned on, they are also marked with an error indicator.

Error checking\* is \*turned on. I have double, triple, and quadruple-checked this. But _there is no error indicator_. Therefore there is no error button and no handy-dandy “Convert to Number” option. I am officially stuck. What am I missing? Help, please!

---

<div class="post-metadata">

**Author:** ![fubbleskag](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fubbleskag](https://boards.straightdope.com/u/fubbleskag)\
**Post date:** [March 5, 2012, 1:31pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/2 "2012-03-05T13:31:16Z")

</div>

Highlight the area you want to convert. Click the “Number” box on the “Home” tab of the ribbon, if you’re using the newer version of Office with the ribbon, or press Alt-O and then E to bring up the “Format Cells” dialog. Choose the “Number” tab, and then choose “Number” in the selection list on the left.

---

<div class="post-metadata">

**Author:** ![Wheelz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wheelz/32/5718_2.png) [@Wheelz](https://boards.straightdope.com/u/Wheelz)\
**Post date:** [March 5, 2012, 1:35pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/3 "2012-03-05T13:35:38Z")

</div>

> [@fubbleskag](#):
>
> Highlight the area you want to convert. Click the “Number” box on the “Home” tab of the ribbon, if you’re using the newer version of Office with the ribbon, or press Alt-O and then E to bring up the “Format Cells” dialog. Choose the “Number” tab, and then choose “Number” in the selection list on the left.

One of the first things I tried. No go. ☹

---

<div class="post-metadata">

**Author:** ![Wheelz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wheelz/32/5718_2.png) [@Wheelz](https://boards.straightdope.com/u/Wheelz)\
**Post date:** [March 5, 2012, 1:58pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/4 "2012-03-05T13:58:03Z")

</div>

I’ve figured part of it out. I was capturing spaces along with the numbers, and deleting the spaces caused the cells to convert automatically. I guess spaces may as well be letters to Excel, and it can’t do anything with a cell including both letters and numbers.

This is still problematic, though, since not every entry has the same number of characters, so I can’t reliably cut all the spaces off when creating columns. There is still a bunch of manual cell-by-cell manipulation necessary, unless I can figure out a way to make Excel ignore the spaces in the first place.

---

<div class="post-metadata">

**Author:** ![Baracus](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@Baracus](https://boards.straightdope.com/u/Baracus)\
**Post date:** [March 5, 2012, 2:03pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/5 "2012-03-05T14:03:14Z")

</div>

How are you importing the text?

If you are using the “Text Import Wizard” then choosing “delimited” rather than “fixed width” should make it so it doesn’t matter how many spaces there are.

---

<div class="post-metadata">

**Author:** ![Wheelz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wheelz/32/5718_2.png) [@Wheelz](https://boards.straightdope.com/u/Wheelz)\
**Post date:** [March 5, 2012, 2:23pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/6 "2012-03-05T14:23:25Z")

</div>

I’m just using copy (CTRL+C) and paste (CTRL+V). How do I get the Wizard?

---

<div class="post-metadata">

**Author:** ![mcgato](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@mcgato](https://boards.straightdope.com/u/mcgato)\
**Post date:** [March 5, 2012, 2:23pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/7 "2012-03-05T14:23:52Z")

</div>

Make a new column and use the formula =value(trim(a2)).

---

<div class="post-metadata">

**Author:** ![Baracus](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@Baracus](https://boards.straightdope.com/u/Baracus)\
**Post date:** [March 5, 2012, 2:29pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/8 "2012-03-05T14:29:52Z")

</div>

> [@Wheelz](#):
>
> I’m just using copy (CTRL+C) and paste (CTRL+V). How do I get the Wizard?

Right-click. Select “Paste Special”. When the dialog box pops up select “text”. After your text is pasted there should be a little clipboard-y icon next to it. Left-click it and choose “use text import wizard”.

I am not sure if there is a more direct way.

---

<div class="post-metadata">

**Author:** ![Duke](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Duke](https://boards.straightdope.com/u/Duke)\
**Post date:** [March 5, 2012, 2:38pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/9 "2012-03-05T14:38:05Z")

</div>

> [@mcgato](#):
>
> Make a new column and use the formula =value(trim(a2)).

This should do it–the =trim() function gets rid of spaces. I just checked it in Excel 2010 and it works correctly.

---

<div class="post-metadata">

**Author:** ![Munch](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/munch/32/5281_2.png) [@Munch](https://boards.straightdope.com/u/Munch)\
**Post date:** [March 5, 2012, 3:06pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/10 "2012-03-05T15:06:55Z")

</div>

I usually just paste the column into a text file, do a “Find & Replace” for spaces to delete them, then input them back into the Excel file. That usually strips out any weird formating issues as well.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [March 5, 2012, 3:08pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/11 "2012-03-05T15:08:09Z")

</div>

This is a job from “GREP” - I assume you are one Windows? Try this: [http://www.wingrep.com/](http://www.wingrep.com/)

---

<div class="post-metadata">

**Author:** ![Wheelz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wheelz/32/5718_2.png) [@Wheelz](https://boards.straightdope.com/u/Wheelz)\
**Post date:** [March 5, 2012, 3:10pm UTC](https://boards.straightdope.com/t/help-with-excel-number-conversion/614810/12 "2012-03-05T15:10:39Z")

</div>

> [@Baracus](#):
>
> Right-click. Select “Paste Special”. When the dialog box pops up select “text”. After your text is pasted there should be a little clipboard-y icon next to it. Left-click it and choose “use text import wizard”.
> 
> I am not sure if there is a more direct way.

This did the trick like a charm!

Thanks for everyone’s responses.
