+ Reply to Thread
Results 1 to 4 of 4

Formula to ignore blank cells and calculate cells having numbers only

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    Amritsar,Punjab
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Formula to ignore blank cells and calculate cells having numbers only

    Hello members,
    I am looking for a Formula to calculate cells having numbers only and ignore blank cells. The condition is between two cells, IF there is a value in "A column" then ADDITION should take place or IF there is value in "B column" then SUBTRACTION should take place

    Case 1:

    Please Login or Register  to view this content.
    Case 2:

    Please Login or Register  to view this content.
    Kindly suggest appropriate formula to the above condition. Thanks!!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to ignore blank cells and calculate cells having numbers only

    try =IF(AND(A2="",B2=""),"",IF(AND(B2="",A2<>""),C2+A2,C2-B2))
    I ignored that you were jumping back and forth between rows and put it all on the same row. You may have to adjust your cells.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    10-28-2009
    Location
    Amritsar,Punjab
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Re: Formula to ignore blank cells and calculate cells having numbers only

    Thanks member @Sambo kid but its not working according to my condition.
    Kindly consider these cells C1,A2,B2,C2
    In Case I:
    If there is any number in A2 and B2 cell is empty then calculate C2=(C1+A2) {Ignoring B2 as blank cell}
    Case II:
    If A2 cell is empty and B2 cell is having any number then calculate C2=(C1-B2) {Ignoring A2 as blank cell}
    Kindly help in excecuting the above condition. Thanks!!

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to ignore blank cells and calculate cells having numbers only

    I did state you might need to repoint the formula, it seems like it will have issues if you try to drag it down.
    but here is what I believe you want based on both your posts in C2....
    =IF(AND(A2="",B2<>""),C1-B2,IF(AND(B2="",A2<>""),C1+A2,""))

+ 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] Formula to calculate number of days & ignore blank cells
    By Mifty in forum Excel General
    Replies: 11
    Last Post: 06-06-2021, 01:42 AM
  2. CSV - Ignore Blank Formula Cells
    By almo136 in forum Excel General
    Replies: 1
    Last Post: 11-06-2017, 08:04 AM
  3. [SOLVED] how to count cells with values but ignore blank cells with formula and in a month?
    By Imran Magsi in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-17-2017, 03:58 AM
  4. [SOLVED] Ignore blank cells with formulas or ignore NA() in a formula
    By guiismiti in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-24-2016, 02:13 PM
  5. Ignore blank cells in formula counting number of different cells.
    By deneh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-07-2015, 08:52 AM
  6. [SOLVED] Return non-blank cells from range AND ignore cells with only formula w/o results
    By grafitti in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-06-2014, 08:15 AM
  7. Replies: 22
    Last Post: 05-03-2009, 07:29 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