Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting text to value
I want to use a macro to check each value in a column and change the
contents from '12 to the number 12 etc , but if the cell has a label like 12A it remains as a label. The following formula does what I want =IF(ISNUMBER(VALUE(A1))=TRUE,VALUE(A1),A1) but I'd like to do the same with a macro. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting text to value
Nicoll,
Select the cells first, then run this macro: Sub TransformToFormula() Dim myCell As Range For Each myCell In Selection myCell.Formula = myCell.Text Next myCell End Sub HTH, Bernie MS Excel MVP "nicoll" wrote in message ... I want to use a macro to check each value in a column and change the contents from '12 to the number 12 etc , but if the cell has a label like 12A it remains as a label. The following formula does what I want =IF(ISNUMBER(VALUE(A1))=TRUE,VALUE(A1),A1) but I'd like to do the same with a macro. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting a text word or text string to a number | Excel Discussion (Misc queries) | |||
Converting text for csv | Excel Discussion (Misc queries) | |||
Converting a date to a text field w/o converting it to a julian da | Excel Worksheet Functions | |||
Converting text??? | Excel Discussion (Misc queries) | |||
converting numbers to text and prefill text field with 0's | Excel Discussion (Misc queries) |