+ Reply to Thread
Results 1 to 6 of 6

code to work for odd rows only

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    code to work for odd rows only

    Hi,
    I am trying to add to this "if" statement that it should only work for rows that are odd and i came up with this:
    Please Login or Register  to view this content.
    but it doesn't work.
    Any ideas?

  2. #2
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: code to work for odd rows only

    If it's helpful here is the whole code
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: code to work for odd rows only

    Try this line

    Please Login or Register  to view this content.
    and add end if

    OR

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: code to work for odd rows only

    Hi AB33,
    Your 2nd suggestion worked just fine.
    Thanks!

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: code to work for odd rows only

    You could avoid testing for odd row if the loop only went through odd row numbers
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: code to work for odd rows only

    Hi mikerickson,
    That is an impressive alternative.
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to make the macro work for all rows in the work sheet
    By Valli nayaki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2013, 10:43 PM
  2. [SOLVED] Code to work on rows 9-220 only
    By Grf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-12-2012, 05:49 AM
  3. Copy rows from work sheets to combine to one work sheet based on cell value
    By joemcmillen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2008, 05:04 PM
  4. Replies: 2
    Last Post: 07-11-2006, 11:15 PM

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