+ Reply to Thread
Results 1 to 6 of 6

two worksheets working togeather

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    12

    two worksheets working togeather

    Is there a way to write a macro to have a cell be colored if a name is typed in based off a range of cells on another sheet. Also this range needs to be dynamic because people can be added or deleted at any time.

    So based on the file I attached if I enter Alex on the calender worksheet this name should appear yellow because he is in the "IP" column but if I move him to say the "MB" column he should be colored green.

    I don't want to use conditional rules because I have a lot of names and they can change columns all the time.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: two worksheets working togeather

    Hi and welcome to the forum

    I don't want to use conditional rules because I have a lot of names and they can change columns all the time.
    This should take care of that.
    1st, create a range name for each category
    Then, highlight the entire range
    go into CF, select New Rule/use formula
    =MATCH(C2,IP,0).......format fill yellow
    Repeat for the other categories
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: two worksheets working togeather

    how does this work if i am calling the names on a different worksheet?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: two worksheets working togeather

    Thats where the named ranges come in. 2007 cannot directly reference cells on another sheet, but the work-around for that is to use named ranges

  5. #5
    Registered User
    Join Date
    01-28-2014
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: two worksheets working togeather

    i get the =match( ,ip, ) part but what is the c2 and the 0 doing in the formula?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: two worksheets working togeather

    The MATCH syntax is...
    =match(criteria-to-find,column(or row)-to-search-in,0) 0 returns exact match
    So we are looking for the contents of C2, in the range (named ) IP, and we want an exact match

+ 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. CountIF and Hlook Up Togeather
    By sreeni85 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-20-2014, 01:30 PM
  2. how to use find and left togeather
    By nuruedriss in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-01-2013, 06:51 AM
  3. linking 2 work books togeather
    By Zealotwraith in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2013, 11:01 AM
  4. Using sumproduct and subtotal togeather ???????
    By LondonM in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2013, 10:59 AM
  5. Replies: 2
    Last Post: 08-01-2012, 11:53 AM

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