Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel formatting question

Status
Not open for further replies.

thekraken

Programmer
Mar 22, 2004
4
US
I am working on a sales reporting tool that allows users to query a SQL db, then shows them results in a .NET front end. It also allows them to download to an Excel sheet complete with Pivot Table for analysis. I have a stored proc that copies a template file, makes a new version of it and inserts the results of their query. The sheet has an auto refresh of the pivot table. Here is the problem - I have about 5 columns that are numeric, and I have formatted the template excel sheet accordingly, however, when the insert occurs, they are not completely numbers, therefore the pivot table shows inaccurate data.

Is there another way to force the data to be numeric?

p.s. If you highlight a cell in those columns, and click in the formula bar, then click out, it changes to a number and right aligns itself. (all other fields are left aligned, even though they are numbers)

Thanks in advance for any help.
 
Multiply all the numerical data by 1 or format cells as numeric and then F2 return on each individual cell which is tedious in the extreme.

Tiglet [reading]

Living on Earth is expensive, but it does include a free trip around the sun every year
 
Thanks Tiglet,
a coworker mentioned the multiply by 1 option, and I think I might just build a macro that does that when the sheet opens. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top