Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Data type conversion

I have created an Excel spreadsheet that pulls information out of tables in
Access to use in calculations in excel. 99% of this data is numeric, but
there are a few exceptions. Because of this, I think I need to store the
data in Access as text data, and then have excel convert it to numeric data
as it pulls it for the 99% of records that are numeric. The 1% that are
text entries need to be pulled in as text. I've already set up my formulas
in Excel with IF statements to repress error displays, so I'm not worried
about the formulas that will try to perform mathematical operations on the
text.

My problem is, I don't even know how to approach this problem. I've never
done anything remotely like datatype conversion in Excel, much less doing it
on-the-fly while pulling from Access. Can anyone point me in the right
direction?

FYI, I'm using Office 2000.

Thanks,

Bryan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Data type conversion

You may not have to do anyting.

If your data is type String then Excel will coerce into the correct data
type. For example:

strDate = "2.14"
wsWorksheet.Range("A1").Offset(1,1) = strData will yield floating point
number 2.14 in the cell.

strData = "200"
wsWorksheet.Range("A1").Offset(1,1) = strData will yield a general
number 200 in the cell

strData = "Hello"
wsWorksheet.Range("A1").Offset(1,1) = strData will yield the text Hello
in the cell

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Data type conversion

I almost follow you...could you elaborate a bit more? I may be making
wrong assumptions about how your example works.

Thanks

B


"Edward Ulle" wrote in message
...
You may not have to do anyting.

If your data is type String then Excel will coerce into the correct data
type. For example:

strDate = "2.14"
wsWorksheet.Range("A1").Offset(1,1) = strData will yield floating point
number 2.14 in the cell.

strData = "200"
wsWorksheet.Range("A1").Offset(1,1) = strData will yield a general
number 200 in the cell

strData = "Hello"
wsWorksheet.Range("A1").Offset(1,1) = strData will yield the text Hello
in the cell

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Data type conversion

"Bryan Linton" wrote ...

I have created an Excel spreadsheet that pulls information out of tables in
Access


How are you fetching the data: MS Query, ADO, SQL.REQUEST, etc?

--
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Data type conversion

I'm using SQL.REQUEST.

If I could keep it all numeric I would, but Access (afaik) won't allow me to
have text entries in numeric data fields.



"Jamie Collins" wrote in message
om...
"Bryan Linton" wrote ...

I have created an Excel spreadsheet that pulls information out of tables

in
Access


How are you fetching the data: MS Query, ADO, SQL.REQUEST, etc?

--





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
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India Data Entry India Excel Worksheet Functions 1 March 31st 08 12:51 PM
File Type Conversion Steve Excel Discussion (Misc queries) 0 February 8th 08 02:04 PM
COUNTIF and automatic type conversion problem joes Excel Discussion (Misc queries) 2 July 25th 05 03:26 PM
COUNTIF and automatic type conversion problem joes Excel Worksheet Functions 2 July 25th 05 03:26 PM
Excel VBA - Data Type Conversion problem PaulC Excel Programming 3 May 10th 04 04:53 PM


All times are GMT +1. The time now is 12:00 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"