+ Reply to Thread
Results 1 to 7 of 7

Having problem to convert a range to a number format

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Having problem to convert a range to a number format

    Hi. I'm trying to convert a range (a1:a12 in the sample) to a number format, but the code below does nothing.

    Know this tiny green sign appears on a cell when there is an error? It suggested me to convert the cell to a number, but when I tried to record this move in order to check its code, it produced basicallty an empty code.. weird, isn't it?

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by GIS2013; 02-26-2014 at 08:40 AM. Reason: typo
    Please * if you like the answer

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Having problem to convert a range to a number format

    It appears that your cells are full of leading spaces, so perhaps use the Trim formula and paste values and they should be numbers. Or even Find(" ") and Replace ("").

  3. #3
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Having problem to convert a range to a number format

    Thanks Stephen. I'll do it if there is no other way, the numberformat option looks so easy but it just doesn't work

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Having problem to convert a range to a number format

    Effectively it's text so formatting it as a number won't make any difference.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,924

    Re: Having problem to convert a range to a number format

    Using your spreadsheet example:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Having problem to convert a range to a number format

    but if I accept the auto-correction tool's suggestion to "convert to number" suddently (see my code below) the MAX function works..

  7. #7
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Having problem to convert a range to a number format

    @alansidman, thanks it works

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  2. Excel: How to convert time format into number format that can be added?
    By Frances Jones in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2012, 04:10 PM
  3. [SOLVED] Convert [h]:mm sum total format to number format
    By Guy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  4. [SOLVED] convert text-format number to number in excel 2000%3f
    By Larry in forum Excel General
    Replies: 1
    Last Post: 07-29-2005, 04:05 PM
  5. Convert numbers from text format to number format
    By merlin68 in forum Excel General
    Replies: 4
    Last Post: 04-12-2005, 09:06 AM

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