Try this code where you specify your range in place of the range I show...
Dim MyRange As String
Dim R As Range
MyRange = "A1

1,A2:B2,A3:C3"
For Each R In Range(MyRange)
R.NumberFormat = "General"
R.Value = CDbl(R.Value)
Next
Rick
"Faboboren" <(E-Mail Removed)> wrote in message
news:740B7430-7003-4C1C-B05E-(E-Mail Removed)...
> Gary,
>
> But how can I include in this macro a selection for variably sized range
> Because this is part of a bigger macro, I do not want select the range
> manually
>
> Thanks
>
>
>
> "Gary''s Student" wrote:
>
>> Just select them in the worksheet before running the macro. You can
>> select a
>> row or a column or a pile of cells.
>> --
>> Gary''s Student - gsnu200754
>>
>>
>> "Faboboren" wrote:
>>
>> > Gary,
>> >
>> > it is working for 1 cell, but how do I select the whole range of
>> > text-numbers to convert in numbers
>> >
>> > "Gary''s Student" wrote:
>> >
>> > > Sub numerify()
>> > > Dim r As Range
>> > > Count = 0
>> > > For Each r In Selection
>> > > If Application.IsText(r.Value) Then
>> > > If IsNumeric(r.Value) Then
>> > > r.Value = 1# * r.Value
>> > > r.NumberFormat = "General"
>> > > Count = Count + 1
>> > > End If
>> > > End If
>> > > Next
>> > > MsgBox (Count & " cells changed")
>> > > End Sub
>> > >
>> > > --
>> > > Gary''s Student - gsnu200754
>> > >
>> > >
>> > > "Faboboren" wrote:
>> > >
>> > > > Hi
>> > > >
>> > > > I have a variably sized range with numbers in text format.
>> > > > I want to select them, and convert to numbers.
>> > > >
>> > > > Thanks