Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CopyFromRecordset text to numeric

Hi,
how to recalculate text cell value after formating cell to numer?
....
cmd.CommandText ="select money(text value), money2(text value),
money3(text value) from money"
....
xlWs.Cells(1, 1).CopyFromRecordset(rs)
xlWs.Columns("A:A").NumberFormat = "0.00"
....

After executing values at cell looking like text(1.89898) but cell
formating is numer. After clicking the cell value changing to
numer(1.9) and you can count total money values. Is the is any way to
recalculate/change cells to be number?
--D.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default CopyFromRecordset text to numeric

Thanx that what i was looking for!!Cool!!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default CopyFromRecordset text to numeric

andrei,
Or convert in your SELECT statement, using CLng, CAST etc depending on the
DB.

NickHK

wrote in message
ups.com...
Hi,
how to recalculate text cell value after formating cell to numer?
...
cmd.CommandText ="select money(text value), money2(text value),
money3(text value) from money"
...
xlWs.Cells(1, 1).CopyFromRecordset(rs)
xlWs.Columns("A:A").NumberFormat = "0.00"
...

After executing values at cell looking like text(1.89898) but cell
formating is numer. After clicking the cell value changing to
numer(1.9) and you can count total money values. Is the is any way to
recalculate/change cells to be number?
--D.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default CopyFromRecordset text to numeric

xlWs.Columns(A:A).Value = xlWs.Columns(A:A).Value
That is working, unfortunatly at that situation i cant use cast,
convert function....but thanx for help
--D.



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
text with a numeric funtion Desperate for Help Excel Discussion (Misc queries) 2 December 20th 07 12:10 PM
text to numeric [email protected] Excel Worksheet Functions 5 December 19th 07 05:04 PM
text to numeric CLEM Excel Discussion (Misc queries) 3 October 17th 07 12:48 PM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM
Text to Numeric lehigh46 Excel Worksheet Functions 3 July 28th 05 06:16 PM


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