then the macro should be modified like this

Sub RemoveLeadingZeros()
   Dim xCell As Range, i As Integer, s As String
   For Each xCell In ActiveSheet.UsedRange
      s = CStr(xCell)
      For i = 1 To Len(xCell)
         If Mid(xCell, i, 1) = "0" Then
            s = Right(s, Len(s) - 1)
         Else
            Exit For
         End If
      Next i
      xCell = s
   Next xCell
End Sub


On Mon, Apr 4, 2011 at 7:34 AM, bhanu prakash <bhanu...@gmail.com> wrote:

> Guys thanks a ton for  responses ,i need to remove only first  letter in
> cell if it is zero in alpha numeric data - regards - bhanu
>

>
> On 04-Apr-2011 3:45 AM, "STDEV(i)" <setiyowati.d...@gmail.com> wrote:
>
> run this macro
> Sub RemoveAllZeros()
>    Dim xCell As Range
>    For Each xCell In ActiveSheet.UsedRange
>       xCell = Replace(xCell, "0", "")
>    Next
> End Sub
> since you ask for  "REMOVING ZERO IN EVERY CELL"
> 1500   will be 15
> 2100500  will be 215
> and so on

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to