I have tried whole lot and it is not working.
My excel sheet has data only in first column. it has about 30 rows.
My job is go through every cell if i see number and bracket( ex- 1) 2) 3)), delete this from the cell. Note there will be other data.
example of first cell: 1) hhhhhh
2nd row cell 2) kkkk
i need to delete only the number and bracket.
below is my code but not working. if you can please help.
My excel sheet has data only in first column. it has about 30 rows.
My job is go through every cell if i see number and bracket( ex- 1) 2) 3)), delete this from the cell. Note there will be other data.
example of first cell: 1) hhhhhh
2nd row cell 2) kkkk
i need to delete only the number and bracket.
below is my code but not working. if you can please help.
Code:
Dim xl, no, bracket,k
k = 1
t = "p"
no = 1
bracket = ")"
Set xl = createobject("excel.application")
xl.Visible = true
Set sd = xl.Workbooks.Open ("F:\usp\FP Tickets to Automate2.xls")
Set st = sd.Worksheets("Sheet1")
rows = st.usedrange.rows.count
coloumn = st.usedrange.columns.count
For k = 1 to 5
a = st.cells(k,1)
msgbox "a " &a
For m = 1 to 3
no = m & bracket
msgbox no
b = Replace(a, no, " ")
msgbox b
instringV = instr(b,no)
msgbox instringV
If instringV > 0 Then
st.cells(k,1) = b
Exit for
End If
msgbox b
st.cells(k,1) = b
Next
Next