+ Reply to Thread
Results 1 to 3 of 3

How to make excel to treat values in cell as a number?

  1. #1
    Peri
    Guest

    How to make excel to treat values in cell as a number?

    How to make excel to treat values in cell as a number?

  2. #2
    Tom Ogilvy
    Guest

    Re: How to make excel to treat values in cell as a number?

    set cell = Range("B9")
    cell.NumberFormat = "General"
    cell.Value = cell.Value

    ' or for extra assurance

    cell.Value = cdbl(cell.Value)

    --
    Regards,
    Tom Ogilvy


    "Peri" <[email protected]> wrote in message news:op.szt6nxbky8ffpb@mcs...
    > How to make excel to treat values in cell as a number?




  3. #3
    David McRitchie
    Guest

    Re: How to make excel to treat values in cell as a number?

    Changing the format of a cell from text to number, or from
    number to text will not affect the actual formatting until
    the cell value is reentered. F2 then Enter would cause
    reentry. A macro such as TrimALL would cause reentry
    http://www.mvps.org/dmcritchie/excel/join.htm#trimall
    Be careful with cells containing dates.

    Changing the format of a number that actually is a number
    is effective immediately, as is changing the format of
    a text string that is already treated as text is also immediate.

    Since this is the programming group you can take care of
    everything at once.
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Tom Ogilvy" <[email protected]> wrote in message news:%[email protected]...
    > set cell = Range("B9")
    > cell.NumberFormat = "General"
    > cell.Value = cell.Value
    >
    > ' or for extra assurance
    >
    > cell.Value = cdbl(cell.Value)
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Peri" <[email protected]> wrote in message news:op.szt6nxbky8ffpb@mcs...
    > > How to make excel to treat values in cell as a number?

    >
    >





+ 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