+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: I think: i somehow changed my default numr format to date

  1. #16
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: I think: i somehow changed my default numr format to date

    Assuming you are pasting to a column that already contains date data, format the whole column as Date and then just paste values. If not, you may have to stick with what you are doing now.

  2. #17
    Forum Guru
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2007
    Posts
    1,252

    Re: I think: i somehow changed my default numr format to date

    fyi: searching this forum i found info on how to change the date format back to general

    http://www.excelforum.com/excel-gene...n-its-own.html

    basically you find the date format in question in the custom format and then delete it.

    still not sure what it happened in the first place.

  3. #18
    Forum Guru
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2007
    Posts
    1,252

    Re: I think: i somehow changed my default numr format to date

    the data i am copying is rather large and while i may be only interessted in a few cols of the data i have been instructed to keep ALL the data in the sheet. So i guess i will keep what i have for now..........because formatting individual cols sounds like a pain........do you think not formatting indidividual cols is ok?


    Also, is there a way to check via vba if this custom format is present

    [$-409]d-mmm-yyyy;@

    this is the date format that caused the problem.

    to fix it i had to remove/delete it from the custom format cells. actually i deleted all the custom formats which had [$-409 in them

  4. #19
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: I think: i somehow changed my default numr format to date

    You could try this:
    
    Sub testing()
       Dim objStyle As Style
       For Each objStyle In ActiveWorkbook.Styles
          If objStyle.NumberFormat = "[$-409]d-mmm-yyyy;@" Then ActiveWorkbook.DeleteNumberFormat objStyle.NumberFormat
       Next objStyle
    End Sub

  5. #20
    Forum Guru
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2007
    Posts
    1,252

    Re: I think: i somehow changed my default numr format to date

    thanks romperstomper........very helpful.........i will try that code out. probably wont get to that until later today. thanks!

+ 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.2.0