Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete 4 to 5 digits from left in a cell
iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow With Cells(i,"A") iPos = InStr(":",.Value) if iPos 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) "saziz" wrote in message ... Hi, I got a sheet where I need to delete number followed by ':'. All these numbers are at the left in a cell like this--- 300: text.... few hundred rows. Any help please? Aziz -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=536939 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete 4 to 5 digits from left in a cell
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 "Invalid outside procedure" I don't know what is. Aziz -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=536939 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete 4 to 5 digits from left in a cell
You need to put it in a macro, for instance
Sub RemoveData() iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow With Cells(i,"A") iPos = InStr(":",.Value) if iPos 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) "saziz" wrote in message ... 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 "Invalid outside procedure" I don't know what is. Aziz -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=536939 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
resetting last cell | Excel Discussion (Misc queries) | |||
auto delete characters in cell left of @ sign | Setting up and Configuration of Excel | |||
delete cell that doesn't contain a specific word | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions |