Results 1 to 3 of 3

Format Method - how do I stop a cell turning into a date?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379

    Format Method - how do I stop a cell turning into a date?

    Right, sorry this is probably a simple one but I can't do it... I have information in a variable that is "1-4" the variable is defined as a String but whenever I use the following code excel turns it into a date.

    Cells(CrtTaskLn, 9) = Area
    I tried this... amoungst other things...

    Cells(CrtTaskLn, 9) = Format(Area, "@")
    Can't seem to get anything to work, bugging the hell outta me! Appreciate any tips.

    EDIT:
    Additionally I need a custom number format that works like 0.##, i.e. displays up to 2 decimal places, but I don't want the decimal point visible if the zeroes aren't present - i.e. that currently displays "1" as "1."
    Last edited by ChrisMattock; 12-10-2008 at 09:26 AM. Reason: Additional question...

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