close

iLastRow = Cells(Rows.Count,quot;Aquot;).End(xlUp).Row
For i = 1 To iLastRow
With Cells(i,quot;Aquot;)
iPos = InStr(quot;:quot;,.Value)
if iPos gt; 0 Then
.Value = Right(.Value, Len(.Value) - iPos)
End If
End With
Next i

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;sazizquot; gt; wrote in
message ...
gt;
gt; Hi,
gt; I got a sheet where I need to delete number followed by ':'. All these
gt; numbers are at the left in a cell like this---gt; 300: text.... few
gt; hundred rows. Any help please?
gt; Aziz
gt;
gt;
gt; --
gt; saziz
gt; ------------------------------------------------------------------------
gt; saziz's Profile:
www.excelforum.com/member.php...foamp;userid=6350
gt; View this thread: www.excelforum.com/showthread...hreadid=536939
gt;

Hi Bob,
I fix my problem, thank you. But wanted to try your code.
At this line: For i = 1 To Len(a) it gives me an error quot;Invalid outside
procedurequot;
I don't know what is.
Aziz--
saziz
------------------------------------------------------------------------
saziz's Profile: www.excelforum.com/member.php...foamp;userid=6350
View this thread: www.excelforum.com/showthread...hreadid=536939You need to put it in a macro, for instance

Sub RemoveData()
iLastRow = Cells(Rows.Count,quot;Aquot;).End(xlUp).Row
For i = 1 To iLastRow
With Cells(i,quot;Aquot;)
iPos = InStr(quot;:quot;,.Value)
if iPos gt; 0 Then
.Value = Right(.Value, Len(.Value) - iPos)
End If
End With
Next i
End Sub

then run RemoveData

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;sazizquot; gt; wrote in
message ...
gt;
gt; Hi Bob,
gt; I fix my problem, thank you. But wanted to try your code.
gt; At this line: For i = 1 To Len(a) it gives me an error quot;Invalid outside
gt; procedurequot;
gt; I don't know what is.
gt; Aziz
gt;
gt;
gt; --
gt; saziz
gt; ------------------------------------------------------------------------
gt; saziz's Profile:
www.excelforum.com/member.php...foamp;userid=6350
gt; View this thread: www.excelforum.com/showthread...hreadid=536939
gt;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()