+ Reply to Thread
Results 1 to 3 of 3

If cell value equals then check another cell.

  1. #1
    Registered User
    Join Date
    03-18-2009
    Location
    Gothenburg
    MS-Off Ver
    Excel 2003
    Posts
    12

    If cell value equals then check another cell.

    Hi!

    Couldn't find the solution to this anywhere.

    I want the macro to check four rows. (A1:A4)
    If the value in the cell is "R" then it should check
    if the value in cell to the right (B1:B4) is "R" too.
    If not then it should color cells C1:C4 in "Sheet2"
    red.

    It should only check if it's "R" in the A column.
    If it's anything else, or blank, it should just skip
    and check the next row.

    It's kinda difficult to explain. But I hope someone
    here got it.
    Last edited by stuntmannen; 03-30-2011 at 05:30 AM.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: If cell value equals then check another cell.

    Hi,

    You could use conditional formatting, where the rule's formula would be:
    =AND($A1="R",$B1<>"R")


    To do with VBA, it would be something along these lines:
    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Registered User
    Join Date
    03-18-2009
    Location
    Gothenburg
    MS-Off Ver
    Excel 2003
    Posts
    12

    Thumbs up Re: If cell value equals then check another cell.

    Finally, it worked!

    Thanks!


+ 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