Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
D
Try xlWs.Columns(A:A).Value = xlWs.Columns(A:A).Value after you change the NumberFormat. -- Dick Kusleika MS MVP - Excel www.dailydoseofexcel.com wrote: 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanx that what i was looking for!!Cool!!
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
text with a numeric funtion | Excel Discussion (Misc queries) | |||
text to numeric | Excel Worksheet Functions | |||
text to numeric | Excel Discussion (Misc queries) | |||
Numeric in Text to convert back to the form of Numeric for VLookup Purposes | Excel Discussion (Misc queries) | |||
Text to Numeric | Excel Worksheet Functions |