Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jul 2006
    Posts
    71
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Change format from TEXT to GENERAL (2003 SP2)

    A helpful soul is revising an Access utility to export data to Excel. This is A Good Thing, but some of the data is being exported as text (with the hidden apostrophe) and I need to convert it to a General format to manipulate it further, using a macro.

    Ideally, the columns are a mixture of numbers (accounting information) and some descriptive text. If practical, I could have the macro select all the rows and change the format of everything to General (or possibly to a number with no decimal places), since that would probably have no effect on the descriptive-text columns.

    Any suggestions?

    Many thanks,

    Ann

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change format from TEXT to GENERAL (2003 SP2)

    You could use code like this:
    <code>
    With ActiveSheet.UsedRange
    .Value = .Value
    End With
    </code>
    You can replace ActiveSheet.UsedRange with a specific range (or with Selection) if you prefer.

  3. #3
    Star Lounger
    Join Date
    Jul 2006
    Posts
    71
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Change format from TEXT to GENERAL (2003 SP2)

    Perfect!

    Many thanks,

    Ann

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •