+ Reply to Thread
Results 1 to 2 of 2

Automating Formating Columns using VBA

  1. #1
    Registered User
    Join Date
    09-28-2007
    Posts
    1

    Automating Formating Columns using VBA

    Hi

    I need to import an excel file to ms access but keep getting errors because the field type varies between ms access and excel and I wanted to use vba to automatically change the column format on my excel sheet depending on a value of a cell.

    From A1 to Z1 on my Excel Sheet there is a value of either T for "Text" which means if a cell has a T then the whole column should be formatted as text and if the cell has a N for "Number" then the whole column should be formatted as Number.

    This is what I had in mind:

    If cell e.g. A1 = "T" then format column as Text but if cell = "N" then format column as number.

    Hope it makes sence.
    Thanks in advance.

    drj
    Last edited by drj; 09-28-2007 at 06:01 AM.

  2. #2
    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
    Something like

    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 !!!

+ 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