+ Reply to Thread
Results 1 to 6 of 6

Date formatting for collums

  1. #1
    Registered User
    Join Date
    04-21-2008
    Posts
    8

    Date formatting for collums

    Hi All,

    am trying to write a macro for a collums to use the date formating dd-mmm-yyyy as i have alot of columns to update!

    please help

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Try:
    Please Login or Register  to view this content.
    HTH

    Jason

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    Please Login or Register  to view this content.
    or using column no

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    04-21-2008
    Posts
    8
    Thank you that works great..one more thing

    I got help with another matter same dating issue
    i would like to step out of a for loop if there's no information found withing the collumn.
    here's the code
    For j = 13 To 14
    Range(Cells(7, j), Cells(LastRow, j)).TextToColumns _
    Destination:=Cells(7, j), DataType:=xlDelimited, _
    FieldInfo:=Array(1, 4)
    Columns(j).EntireColumn.AutoFit

    IF columns(j).value = "" then
    exit for
    end if


    Next j
    the for loop is okay it's the if that i need help or how to ignore the column and move to the next without it prompting a warning.

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Can you please wrap your code. Also a new question should be in it's own thread - Read forum rules below.

    VBA Noob

  6. #6
    Registered User
    Join Date
    04-21-2008
    Posts
    8
    Thanks VB_Noob it works!

+ 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