+ Reply to Thread
Results 1 to 3 of 3

IF MATCH formula to exclude blank cells in range

  1. #1
    Registered User
    Join Date
    12-17-2021
    Location
    London,England
    MS-Off Ver
    Office 2016
    Posts
    1

    Exclamation IF MATCH formula to exclude blank cells in range

    Hi,

    I was wondering if anyone could help me with a formula I've been having immense trouble figuring out how to write. In my Data Set to Use for Comparison column, I would like to pull in the closest matching value to my actual result, but exclude any blank values. So for example, in Row 10, where the only Data value is 14, I would like my formula to pull back the number 14 rather than the blank values.

    I've worked out the below formula if there were only two data sets to use, but cannot figure out how to create a formula to include 4 data sets:
    ={IF(AND(B2="",C2<>""),C2,IF(AND(B2<>"",C2=""),B2,IF(AND(B2="",C2=""),"",IF(AND(B2<>"",C2<>""),INDEX(B2:C2,MATCH(MIN(ABS(B2:C2-A2)),ABS(B2:C2-A2),0))))))}

    Is there a relatively simple way to either add to or rewrite the above formula to include cells from columns C and D in the range, but to exclude any blank cells from the entire range?

    Thanks
    Attached Files Attached Files
    Last edited by FORMULASH; 12-17-2021 at 11:59 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,740

    Re: IF MATCH formula to exclude blank cells in range

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: IF MATCH formula to exclude blank cells in range

    Proposed solution:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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: 3
    Last Post: 04-04-2020, 06:23 PM
  2. [SOLVED] Change formula that removes blank cells to also exclude certain text from output list.
    By Big.Moe in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-26-2018, 03:50 PM
  3. Exclude blank cells from COUNTIFS formula
    By Leahsco in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-05-2014, 11:45 AM
  4. I want to exclude blank cell in index match formula with multiple criteria
    By NOOR8225 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-16-2013, 06:51 AM
  5. Getting Rank formula to exclude zero and blank cells
    By Catherine01 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-11-2013, 06:10 AM
  6. Exclude blank/FALSE cells in in Excel array IF formula output
    By sushix in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-08-2013, 11:42 AM
  7. [SOLVED] Exclude blank cells from a range?
    By achidsey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2005, 10:05 PM

Tags for this Thread

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