![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: England
Posts: 1
|
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 |
|
Board Regular
Join Date: Apr 2002
Location: Minnesota
Posts: 821
|
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.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|