Results 1 to 5 of 5

get number instead of string when using Format(x, "#,##0.00")

Threaded View

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Question get number instead of string when using Format(x, "#,##0.00")

    Hi,


    I'm using the following code.

    Cells(1,1).Value = Format(Round(nTotal, 2), "#,##0.00")
    When I look at the generated file I see that the cell is left aligned and there is an exclamation saying that the number has been saved as text.
    This is obviously not what I want.

    I checked the format function and it seems to return a string.
    Is there a way to make sure it returns a number.


    Thanks
    Last edited by gosa; 12-06-2011 at 10:22 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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