+ Reply to Thread
Results 1 to 3 of 3

Fill Cells based on 3 Criteria (2 that match and 1 that doesn't)

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Fill Cells based on 3 Criteria (2 that match and 1 that doesn't)

    Hello Everyone,

    I haven't found anything like this question so hopefully someone can help me. I've attached an example spreadsheet containing how the data looks before the macro and how it should look afterwards.

    What I'm trying to do (using the spreadsheet as reference) - between rows, if the data in column B and column E match but the data in column H does not, then an "X" should be place in column G. For example, in row 4, row 6, and row 17, you can see that column B says "January" and column E says "Sunday", however, only in row 4 and 6 does column H say "1" (Row 17 says "2"). Therefore, I'd like all three rows to have "X" in column G.

    If Row 17 did not exist, then row 4 and row 6 wouldn't need anything done because all three columns would match.

    Please let me know if I need to explain this a little better. Thank you in advance for all your help!

    TestBook2.xlsx

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Fill Cells based on 3 Criteria (2 that match and 1 that doesn't)

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Re: Fill Cells based on 3 Criteria (2 that match and 1 that doesn't)

    Thanks for the quick response AlphaFrog! I am having a little bit of an issue though - with my actual data, the headers are in the first row. I tried changing the "A3" and "G3" in the code to read "A1" and "G1" but it doesnt look like that solved it. When I run the macro, it is just taking the header from row 1 and putting it in row 3.

    Could you please help me figure out what needs to be changed?

    Thanks again!


    Edit: Actually, I just reran the macro and changing A3 and G3 to A1 and G1 made it work! Thanks again for all your help!
    Last edited by freybe06; 06-21-2013 at 10:13 AM. Reason: Fixed!

+ 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