+ Reply to Thread
Results 1 to 3 of 3

Maybe very simple, andif?

  1. #1
    Registered User
    Join Date
    08-15-2006
    Posts
    2

    Question Maybe very simple, andif?

    What I'm looking for is how to combine arguments in a way that its not If this OR that, but that its if this AND that. I want cell H6 to turn green and display an "X" character when cell B6 is green and contains "O" for instance.

    This is what I have thusfar:

    If Range("B6").Interior.Color = RGB(0, 255, 0) = "O" Then Range("H6").Interior.Color = RGB(0, 255, 0) = "X"


    Cell H6 does turn green when B6 is green, but no "X" shows up in H6.
    Can someone help me with this? Thanks in advance.

  2. #2
    Die_Another_Day
    Guest

    Re: Maybe very simple, andif?

    If Range("B6").Interior.Color = RGB(0, 255, 0) And Range("B6") = "O"
    Then
    Range("H6").Interior.Color = RGB(0, 255, 0)
    Range("H6") = "X"
    End If

    Charles
    Viperius wrote:
    > What I'm looking for is how to combine arguments in a way that its not
    > If this OR that, but that its if this AND that. I want cell H6 to turn
    > green and display an "X" character when cell B6 is green and contains
    > "O" for instance.
    >
    > This is what I have thusfar:
    >
    > If Range("B6").Interior.Color = RGB(0, 255, 0) = "O" Then
    > Range("H6").Interior.Color = RGB(0, 255, 0) = "X"
    >
    >
    > Cell H6 does turn green when B6 is green, but no "X" shows up in H6.
    > Can someone help me with this? Thanks in advance.
    >
    >
    > --
    > Viperius
    > ------------------------------------------------------------------------
    > Viperius's Profile: http://www.excelforum.com/member.php...o&userid=37565
    > View this thread: http://www.excelforum.com/showthread...hreadid=571959



  3. #3
    Registered User
    Join Date
    08-15-2006
    Posts
    2
    Thanks! Knew it had to be something simple but excel help didn't show the and function.

+ 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