+ Reply to Thread
Results 1 to 7 of 7

excel paste/numbers not stored as text

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    4

    excel paste/numbers not stored as text

    Greetings

    I'm trying to paste a group of data (words and numbers) into a premade template and my numbers keep being stored as text. I've tried pasting special as values but that doesn't help.

    Is there a way that I'm not aware of that will allow me to paste the numbers as numbers and not text?
    The problem I'm running into is the template has formulas that are supposed to match sets of numbers, but the formula wont work when they're stored as text.
    Its easy for me because I can just change them to numbers and it works, but I'm trying to make this accessible for excel users of all skill levels. Just a "paste-and-go" kind of thing.

    thanks!
    Last edited by festival; 07-12-2012 at 03:45 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: excel paste/numbers not stored as text

    Are you doing a straight "paste" and not a "paste values"? What are the cells formatted as before anything is pasted into them? It should paste them as numbers unless Excel sees them as text for some reason. The most likely reason is spaces before or after. Is that the case? I can't think of anyway to override this unless you move the spaces before hand. What method are you using to convert them back to numbers?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: excel paste/numbers not stored as text

    consider

    b1=value(a1)

    rather than trying to "fix" the copy/paste step, just wrap the formula around the VALUE() function so the formulas can handle numbers-as-text (passing a number into VALUE just returns the number so that's not a problem).

  4. #4
    Registered User
    Join Date
    07-12-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: excel paste/numbers not stored as text

    Quote Originally Posted by ChemistB View Post
    Are you doing a straight "paste" and not a "paste values"? What are the cells formatted as before anything is pasted into them? It should paste them as numbers unless Excel sees them as text for some reason. The most likely reason is spaces before or after. Is that the case? I can't think of anyway to override this unless you move the spaces before hand. What method are you using to convert them back to numbers?
    The results are the same whether I use paste, or paste values. The destination cells are formatted as numbers out to 7 decimals. I can convert them to numbers after they're pasted by clicking the option "convert to number" when the cell is highlighted.
    The issue appears to be with the source data, which is formatted as text in order to keep the integrity of the data format. In other words a cell which would have the number "02" is formatted as text, because excel would otherwise shorten this to "2".

  5. #5
    Registered User
    Join Date
    07-12-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: excel paste/numbers not stored as text

    Quote Originally Posted by ben_hensel View Post
    consider

    b1=value(a1)

    rather than trying to "fix" the copy/paste step, just wrap the formula around the VALUE() function so the formulas can handle numbers-as-text (passing a number into VALUE just returns the number so that's not a problem).
    Ben, great suggestion. I tried this but If some of the data is not a number, or a mixture of letters and numbers it returns the "#VALUE" error. This would work like a charm if I could count on all my data being just numbers. Unfortunately I have a mix.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: excel paste/numbers not stored as text

    If(iserror(value(a1)),a1,value(a1))

  7. #7
    Registered User
    Join Date
    07-12-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: excel paste/numbers not stored as text

    Quote Originally Posted by ChemistB View Post
    If(iserror(value(a1)),a1,value(a1))
    BOOM! that's the stuff Chemist!

    thanks so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1