+ Reply to Thread
Results 1 to 3 of 3

Ignore Blanks in IF Statement

  1. #1
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Ignore Blanks in IF Statement

    Hi all,

    I was wondering if I could get some help. I am using the following formula to calculate if two numbers match and then return a specific statement. The problem I have is when both cells are blank it returns "agree" or "disagree" if one is blank and the other is not. However, I want it to ignore the calculation and return a blank if either cell is blank. I have seen a way to do this, but none of these methods allow me to return a specific statement.

    #=IF(F2=G2,"Agree","Disagree")#

    Any help would be greatly appreciated.

    Thanks!

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Ignore Blanks in IF Statement

    Perhaps Try

    =IF(F2="","",IF(F2=G2,"Agree","Disagree"))
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Ignore Blanks in IF Statement

    Try

    =IF(COUNT(F2:G2)=2,IF(F2=G2,"Agree","Disagree"),"")

  4. #4
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Re: Ignore Blanks in IF Statement

    Thanks both. Much appreciated.

+ 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. Ignore Blanks when using Randomize
    By How How in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2016, 02:40 PM
  2. Chart, ignore blanks
    By rwernlund in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-12-2015, 01:56 PM
  3. COUNTIF Statement ignore blanks
    By shanikakbrown in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-12-2014, 06:42 PM
  4. If Statement, ignore blanks
    By shanikakbrown in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-12-2014, 05:34 PM
  5. [SOLVED] Modifying =IF statement to ignore blanks
    By mrjinx007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-31-2013, 10:05 AM
  6. [SOLVED] MIN/MAX IF To Ignore Blanks
    By splendidus in forum Excel General
    Replies: 2
    Last Post: 07-04-2012, 04:00 PM
  7. Concatenate and ignore blanks
    By nujwaan in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 09-24-2009, 11:23 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