+ Reply to Thread
Results 1 to 2 of 2

Simple Query

  1. #1
    Forum Contributor
    Join Date
    08-20-2005
    Posts
    171

    Simple Query

    I want to write a macro which highlights rows
    21,23,36,29,34,35 ....

    I am trying
    For i = 21,23,36,29,34,35
    cells(i,4).entirerow.interior.colorindex = 40
    Next


    Not quite there....
    Thanks

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    forget the For loop & use a single command - much quicker

    Please Login or Register  to view this content.
    PS. you can not use a for loop that way

    for i = 20 to 30 step 1

    or

    for i = 20 to 30 step 2 ' increase by 2 (20, 22, 24 etc)

    or

    for i = 30 to 20 step -1 ' decrease by 1
    Last edited by mudraker; 02-20-2007 at 08:38 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1