Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Excel in the Round

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    England
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm using VBA's TransferSpreadsheet to export a table from Access to Excel, thereby creating a new .XLS file.

    Some of the columns in my Access table contain numbers representing prices, but those numbers are held to many decimal places.

    I want those numbers to appear in the spreadsheet, but rounded up to the nearest penny, i.e. to 2 d.p.'s. Is there any way I can (from within my Access VBA code) specify or alter the format of particular Excel columns, so that the data appears as I would like it to, rather than having to do all of the rounding up in Access (and thereby losing the less significant decimal places of my data) ?

    Thanks,

    Pat Gale
    England

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Minnesota
    Posts
    821
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    In Access, create a query that does the rounding and export the results of the query to Excel. Your original data will stay intact and you will have what you want in Excel.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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