+ Reply to Thread
Results 1 to 3 of 3

Thread: Help using SUM, PRODUCT and IF in a formula

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Help using SUM, PRODUCT and IF in a formula

    Hello I am new to the forum and have minimal skills in excel and need some help!

    I am currently doing a project where I need to calculate various quantities for a building project into a budget. I am trying to get a formula that can calculate the totals of specific columns regardless if one column has a zero value inserted.

    The column description are as follows:

    C: No. (for instance number of doors or wash basins) <if column C is being used columns D,E,F are not used, visa versa>

    D,E and F are dimension columns e.g (the area of tiles or depth of excavation) and are multiplied out

    D: Length
    E: Width (may or may not be used given if a measurement is in lineal meters, m2 or m3)
    F: Height (may or may not be used given if a measurement is in m2 or m3)

    G: Times (multiplies the totaled value if its a repeated element or set) will always be greater or equal to 1


    I am stuck on how to get a formula to calculate it out properly, and just been scouring the net and help guides.

    =SUMIF(C12:F12,">0")*(G12) This is the formula I have been playing around and using this to calculate, which works for half my problem but not the other half!

    Trial data: using =SUMIF(C12:F12,">0")*(G12)

    example1: (just using a No. calc) C: 4 D: 0 E: 0 F: 0 G: 2 RESULT: 8 WANT: 8

    example2: (using a LxWxH calc) C: 0 D: 3 E: 2 F: 2 G: 2 RESULT: 14 WANT: 24

    example2: (using a LxW calc) C: 0 D: 3 E: 2 F: 0 G: 3 RESULT: 10
    WANT: 12

    I don't have an issue when I enter a zero value, the issue is getting columns D,E,F to times out instead of add together.

    Any ideas on a correct formula? (i am stumped for an answer)
    Am I approaching the problem in the right way? or do I need to use two separate formulas?

    I can solve my problem with two formulas.... but I am trying to keep the amount of formulas to a minimum to save time so I can just insert the data without having to copy and paste different formulas...

    If anyone can help me that would be greatly appreciated!!!!
    Last edited by TheZaps; 06-29-2011 at 05:35 AM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Help using SUM, PRODUCT and IF in a formula

    try perhaps:

    =PRODUCT(IF(C12:F12>0,C12:F12))&G12

    or

    =PRODUCT(IF(C1:G1>0,C1:G1))

    either formula must be confirmed with CTRL+SHIFT+ENTER not just ENTER
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    06-28-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help using SUM, PRODUCT and IF in a formula

    Thank you very much for the assistance! The second formula worked for what I needed!

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0