+ Reply to Thread
Results 1 to 2 of 2

Referencing 2 separate worksheets in a macro

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    Kingston, ON
    MS-Off Ver
    Excel 2010
    Posts
    1

    Referencing 2 separate worksheets in a macro

    Hi all,

    I am trying to write a macro that runs through each cell in the active work sheet (this work sheet will constantly vary) and make a comparison to a cell in a set work sheet (will not vary) and if a condition is met, an action is taken in the non-varying work sheet.

    I am still trying to pick up on VBA syntax and I'm having trouble with the macro, here is a very crude version of what I want:

    For Each c In [A1: CQ120]
    IF activeworksheet.c.Interior.ColorIndex = ClrIndexr1 AND Sheets("Non-Varying Sheet").c.interior.colorindex = 2 THEN Sheets("Non-Varying Sheet").c.interior.colorindex = 3

    Cheers,

    Beck

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Referencing 2 separate worksheets in a macro

    Don't think your that far off. Try:

    Please Login or Register  to view this content.

+ 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