Record Click on Error Indicator

N

Nasir

Hello All,
I have a sheet in Excel 2007 having mixed data including numbers
stored as text.

I have recorded the following macro which selects the numbers stored
as text in Col G as shown in the Array

Sub Macro2()
Range("G1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$J$5351").AutoFilter Field:=7,
Criteria1:=Array("1" _
, "10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
"2", "20", "21", "22", "23", "24" _
, "25", "26", "27", "28", "29", "3", "30", "31", "32", "33",
"34", "35", "36", "37", "38", "39" _
, "4", "40", "41", "42", "43", "44", "45", "46", "47", "48",
"49", "5", "50", "51", "52", "53", _
"54", "55", "56", "57", "58", "59", "6", "60", "7", "8", "9"),
Operator:=xlFilterValues
Range("G2:G5338").Select

[Here I Click the error indicator i.e Exclamation Mark and select
Convert To Number]

Selection.NumberFormat = "0.0"
Selection.NumberFormat = "0.00"
End Sub

Is there a way to
1. Shorten the array in groups i.e 1 to 9, 10 to 19, 20 to 29, 30 to
39, 40 to 49 and so on..
2. Record the click on the error indicator.

Any help would be appreciated

TIA
Nasir
 
J

Javed

if you have a column numbers stored as text.No need to select all
individually.

Select the first cell of column which stored as text then click on
error indicator and get all converted.
 
N

Nasir

if you have a column numbers stored as text.No need to select all
individually.

Select the first cell of column which stored as text then click on
error indicator and get all converted.

Thanks for the reply...
but I have data in mixed format in the column....so I cannot do as per
your suggestion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top