+ Reply to Thread
Results 1 to 3 of 3

VBA several IF AND OR criteria

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    VBA several IF AND OR criteria

    Hi All

    I'm trying to filter a sheet on several criteria but I can't get the results that I want so far. I also don't know how to check number of words in a cell. Any help appreciated!


    If Column C contains Type1 Then
    =================================================================
    If Column E is blank OR If Column L contains value in TechArray then ignore row
    =================================================================
    If Column E contains <=2 words and (Column E does not contains “meter” or “flow”) and (Column G, H or I is blank or contains “Unknown” ignore row
    OR
    If Column E contains <=2 words and (Column E contains “meter” or “flow”) and (Column G is blank or contains “Unknown”) ignore row
    ================================================================
    If Column E contains >2 words ignore row copy row

    Please Login or Register  to view this content.
    Last edited by warp765; 05-30-2020 at 04:32 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: VBA several IF AND OR criteria

    Hi Warp,
    It may be useful if you attach a sample file (without confidential data), allowing a clearer picture on the raw data and showing the expected outcome. in a second tab.

  3. #3
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: VBA several IF AND OR criteria

    Hi there,

    Thanks for the reply. Ive attached my workbook with the full code and removed confidential info. The if criteria I mentioned that I need help with for 'Type3' is near the top of the module.

    The first tab is the raw data and the rest are the results. Thanks!
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 03-25-2020, 08:06 AM
  2. Replies: 2
    Last Post: 01-03-2017, 08:40 AM
  3. Replies: 4
    Last Post: 11-01-2016, 03:28 PM
  4. Replies: 1
    Last Post: 09-03-2013, 07:41 PM
  5. Count statement wtih multiple criteria only showing results for one criteria
    By uhlabomber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2013, 02:47 PM
  6. Replies: 4
    Last Post: 01-08-2013, 12:37 PM
  7. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 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