+ Reply to Thread
Results 1 to 4 of 4

If statement with multiple conditions

  1. #1
    Registered User
    Join Date
    03-04-2005
    Posts
    34

    If statement with multiple conditions

    Hello All,

    I have been trying to figure out the best way to use an IF statement requiring multiple conditions. I have the following VBA code below in which I am trying to have Excel find cells in a specific range (UsedRange) which contain a double line at the top of the cell AND are not empty.

    Please Login or Register  to view this content.
    I have been researching online and do not believe there is an "AND" operator for IF statements in VBA. Any help with finding a work around would be greatly appreciated!

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: If statement with multiple conditions

    Hello mike703,

    For if statements you just kind of stack them so it looks like this:

    Please Login or Register  to view this content.
    Thanks,

    RVASQUEZ

  3. #3
    Registered User
    Join Date
    07-11-2008
    Location
    The Netherlands
    Posts
    6

    Re: If statement with multiple conditions

    Or you could loose the second 'if':

    Please Login or Register  to view this content.
    Emiel
    Prof. VBA Developer
    redcirclesoftware.com

  4. #4
    Registered User
    Join Date
    03-04-2005
    Posts
    34

    Re: If statement with multiple conditions

    Two excellent ideas, thanks for the fast reply!

+ 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