Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Formatting Numeric Fields from Within MS Query

I have an Excel database which contains one numeric column named
Price. That Price column is formatted as "#,##0". In other words, no
decimal places.

Drilling down through the Data menu, I run the MS Query Wizard, and on
the last screen, I choose "View data or edit query in Microsoft
Query". This shows me a Data Grid (similar to that in Access) where I
can also open a Query Grid.

The Problem I'm having is that even though the Price field in the
worksheet shows no decimal places, the numbers display with 1 decimal
place in the data grid in the MS Query screen. For example the number
28 in the worksheet displays as 28.0 in the data grid in MS Query.

I can't find anything in the MS Query Help screens to indicate how I
can format that field to no decimal places either from within the data
grid or from the query grid.

I've tried creating a new field in the data grid using
"Format(Price,"#,##0")" but I get an error message. Is there a way I
can format numbers from within MS Query?
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Formatting Numeric Fields from Within MS Query

I always create my MSQueries with my Excel Macro Recorder turned on, and then
fire the macro to run the Query whenever I want. This allows me to edit the
macro and perform whatever formatting I wish.........very handy.

Vaya con Dios,
Chuck, CABGx3



"Paul D. Simon" wrote:

I have an Excel database which contains one numeric column named
Price. That Price column is formatted as "#,##0". In other words, no
decimal places.

Drilling down through the Data menu, I run the MS Query Wizard, and on
the last screen, I choose "View data or edit query in Microsoft
Query". This shows me a Data Grid (similar to that in Access) where I
can also open a Query Grid.

The Problem I'm having is that even though the Price field in the
worksheet shows no decimal places, the numbers display with 1 decimal
place in the data grid in the MS Query screen. For example the number
28 in the worksheet displays as 28.0 in the data grid in MS Query.

I can't find anything in the MS Query Help screens to indicate how I
can format that field to no decimal places either from within the data
grid or from the query grid.

I've tried creating a new field in the data grid using
"Format(Price,"#,##0")" but I get an error message. Is there a way I
can format numbers from within MS Query?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concantenate numeric fields Pa Maher Excel Worksheet Functions 10 January 17th 07 01:50 PM
how do I remove zone punches from numeric fields Lou Nugai Setting up and Configuration of Excel 2 September 28th 06 10:10 AM
removing leading zeros in numeric fields dingy101 Excel Discussion (Misc queries) 3 November 21st 05 03:46 AM
Assigning text values to numeric fields ab565 Excel Discussion (Misc queries) 1 August 11th 05 10:49 PM
Use a calc to figure sum in months using date fields but numeric r susiespassion Excel Worksheet Functions 8 February 6th 05 11:32 PM


All times are GMT +1. The time now is 12:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"