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

Thread: Macro Performed on Selected Range

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Home
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    what is the proper syntax to perform the following in an Excel Macro:

    "For Each Cell in the selected range do this"

    thanks in advance!

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The following example will make the value of each cell in a selection 1.

    Sub Macro1()
    For Each cell In Selection
    cell.Value = 1
    Next
    End Sub

    It's never too late to learn something new.

    Ricky

  3. #3
    New Member
    Join Date
    May 2002
    Location
    Home
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thank you very much. I will give it a try

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
  •