+ Reply to Thread
Results 1 to 4 of 4

How to get excel to ignore criteria if cell is blank? (Min/Max/Average/Countif)

  1. #1
    Registered User
    Join Date
    10-15-2013
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    15

    How to get excel to ignore criteria if cell is blank? (Min/Max/Average/Countif)

    Hi,

    I am excel 2003 user

    I have multiple criteria to locate information e.g. Price history within my database.
    (Criteria: e.g. Industry, Period, credit rating)

    One of the criteria is sometimes blank and if so, I would like for excel to ignore this criteria altogether and locate the information based on the remaining information, instead of trying to match the blank cell to the result.

    The functions are Min/Max/ Average price info within database.

    This is currently the formula that I have managed to build, which will include the blank cell to locate the price info.

    =MIN(IF((Database!$C$2:$C$14>=$B$4)*(Database!$C$2:$C$14<='Output - Summary'!$C$4)*(Database!$B$2:$B$14='Output - Summary'!$B$5),Database!P2:$P$14,""))

    Your help/advice will be much appreciated!

    Cheers,
    Nat

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to get excel to ignore criteria if cell is blank? (Min/Max/Average/Countif)

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-15-2013
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: How to get excel to ignore criteria if cell is blank? (Min/Max/Average/Countif)

    Hi! Thanks for the quick reply! I actually managed to find the answer to this

    My initial issue was, I wanted to locate historical price data, based on 3 criteria, e.g. Country, Period, Credit Rating. At some point of time, I wanted to leave one of the criteria "blank", and locate the price based only on 2 or even 1 criteria.

    I followed this formula

    =MIN(IF(((D13:D19=B5)+(B5=""))*((F13:F19=B4)+(B4=""))*((G13:G19=B6)+(B6="")),A13:A19,""))

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to get excel to ignore criteria if cell is blank? (Min/Max/Average/Countif)

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Autofilter with multiple criteria - how to ignore blank criteria
    By MOONDRIFT47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2012, 12:20 PM
  2. [SOLVED] Can Autofilter Ignore Blank Criteria?
    By RogueArchon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2012, 01:20 PM
  3. Replies: 4
    Last Post: 12-27-2011, 04:26 PM
  4. Replies: 5
    Last Post: 09-07-2011, 11:14 PM
  5. COUNTIF, dates and blank cell criteria
    By luvthavodka in forum Excel General
    Replies: 6
    Last Post: 06-01-2006, 04:55 PM

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