LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Data format issue for Graph

Jon Peltier wrote:

Could you populate a VBA array with the recordset data, then loop

through the array to run this:

MyArray(i,j) = Val(MyArray(i,j))

to assure that the array is storing numerical values?


Much easier to do the work on the server to cast the values as numeric.
I don't think the OP advised what the database product is (a DSN hides
so much) but if it is SQL-92 compliant e.g.

SELECT
CAST(my_text_col AS FLOAT) AS converted_numeric_col
FROM vipr_weekly_usage_tmp;

But if it is Jet then use the VBA5 cast functions e.g.

SELECT
CDbl(my_text_col) AS converted_numeric_col
FROM vipr_weekly_usage_tmp;

Jamie.

--

 
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
Can't graph data with Date Format with hours BRB Excel Discussion (Misc queries) 2 August 13th 08 10:13 AM
How do I graph data daily as a line graph across a calendar format Glani Charts and Charting in Excel 3 November 23rd 07 09:05 AM
VLOOKUP/Index&Match data format issue [email protected] Excel Worksheet Functions 3 April 4th 07 07:31 PM
How do I format the data labels in my stacked bar graph? ocjred Charts and Charting in Excel 2 August 2nd 06 04:05 PM
Data format issue Dave Yeager Excel Programming 2 August 5th 03 10:41 PM


All times are GMT +1. The time now is 09:35 AM.

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"