+ Reply to Thread
Results 1 to 4 of 4

Ignoring NA or empty cells when adding, multiplying and dividing all in one formula

  1. #1
    Registered User
    Join Date
    08-19-2014
    Location
    bujumbura
    MS-Off Ver
    2013
    Posts
    6

    Ignoring NA or empty cells when adding, multiplying and dividing all in one formula

    Dear Excelers,

    I hope you are well.

    I have the following formula that uses coefficients to calculate a specific score:

    (Value1*coefficient1 + Value2*coefficient2 + Value3*coefficient3) / (coefficient1+coefficient2+coefficient3)

    I need a formula that not only ignores if any ValueX is #N/A but also if the ValueX is #N/A (or blank cell), its corresponding coefficient should be also #N/A when the coefficients are being added

    For example if Value2 is #N/A the formula should calculate as follows

    (Value1*coefficient1 + Value3*coefficient3) / (coefficient1+coefficient3)

    Is it possible?

    Thanks for your help

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Ignoring NA or empty cells when adding, multiplying and dividing all in one formula

    Is it possible?
    Probably. I suggest you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Ignoring NA or empty cells when adding, multiplying and dividing all in one formula

    try ...

    =SUM(IF(ISERROR(A1:C1),0,A1:C1*A2:C2))/SUM(IF(ISERROR(A1:C1),0,A2:C2))

    Enter with Ctrl+Shift+Enter

    A1:C1 values

    A2:C2 coefficients

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Ignoring NA or empty cells when adding, multiplying and dividing all in one formula

    Have a look at the AGGREGATE function https://support.office.com/en-my/art...6-e19993fa26df - Much better than array formulas

+ 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. Forecast Formula - Ignoring Blank/Empty Cells
    By prudential in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-25-2015, 12:19 PM
  2. [SOLVED] Multiplying and adding multiple cells to get a sum
    By becky04 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-18-2014, 10:05 PM
  3. [SOLVED] Adding two cells then dividing by another
    By KJC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2013, 11:17 PM
  4. Ignoring blank cells when multiplying
    By swng1grl in forum Excel General
    Replies: 4
    Last Post: 06-09-2011, 10:09 AM
  5. Excel 2007 : Ignoring empty cells in formula
    By t1mvv in forum Excel General
    Replies: 1
    Last Post: 10-07-2010, 02:26 PM
  6. Multiplying then dividing the result of the multiplication
    By cbaker1615 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-08-2010, 04:09 PM
  7. Ignoring Empty Cells
    By cheshajim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2007, 12:27 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