Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How to make excel to treat values in cell as a number?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
set cell = Range("B9")
cell.NumberFormat = "General" cell.Value = cell.Value ' or for extra assurance cell.Value = cdbl(cell.Value) -- Regards, Tom Ogilvy "Peri" wrote in message news:op.szt6nxbky8ffpb@mcs... How to make excel to treat values in cell as a number? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Changing the format of a cell from text to number, or from
number to text will not affect the actual formatting until the cell value is reentered. F2 then Enter would cause reentry. A macro such as TrimALL would cause reentry http://www.mvps.org/dmcritchie/excel/join.htm#trimall Be careful with cells containing dates. Changing the format of a number that actually is a number is effective immediately, as is changing the format of a text string that is already treated as text is also immediate. Since this is the programming group you can take care of everything at once. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Tom Ogilvy" wrote in message ... set cell = Range("B9") cell.NumberFormat = "General" cell.Value = cell.Value ' or for extra assurance cell.Value = cdbl(cell.Value) -- Regards, Tom Ogilvy "Peri" wrote in message news:op.szt6nxbky8ffpb@mcs... How to make excel to treat values in cell as a number? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I make Excel 2003 treat blank cells as zero? | Excel Discussion (Misc queries) | |||
How can I make a Chart data series treat blanks as "Empty" cells | Charts and Charting in Excel | |||
Force Excel To Treat A Cell As Blank | Excel Worksheet Functions | |||
Getting Excel to treat merged cells as one cell when printing | Excel Discussion (Misc queries) | |||
Excel - treat pairs of figures differently according to values | Excel Worksheet Functions |