Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: One more question...

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    What would the macro code be to do the following. When I press the button I need it to go through the sheet, looking in every cell. If the info in the cell begins with : then I need it put 00 before it. Is that possible?

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Every Cell?

    Sub EverySingleCell()
    Dim x
    Dim y
    For x = 1 To 256
    For y = 1 To 65536
    If Left(Cells(y, x).Value, 1) = ":" Then _
    Cells(y, x).Value = "'00" & Cells(y, x).Value
    Next: Next
    End Sub

    OK?

    Tom

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •