+ Reply to Thread
Results 1 to 4 of 4

Divided sums of 2 columns with denominator changing based on blank values in a column

  1. #1
    Registered User
    Join Date
    12-31-2013
    Location
    OH, USA
    MS-Off Ver
    Excel 2003, docs.google.com
    Posts
    2

    Divided sums of 2 columns with denominator changing based on blank values in a column

    Hello,

    I am trying to create a sheet on docs.google.com that takes the sum of 1 row divided by the sum of another row removing numbers from the denominator if fields are left blank. Hard for me to explain so here is an example:

    Counter Column 2 Column 3
    2 2 blank value
    2 blank value 1
    2 2 2
    6 4 3

    Leaving a blank value in column 2 makes it read 4/6 giving me 66%, Column 3 giving me 50%.

    What I would like it to do is if there is a blank value in any column remove column one from the denominator.

    Upon completion the total output percentage for column 2 should be 100%, and column 3 should be 75%.

    I thank you for any help you can provide.
    Last edited by cujofreak; 12-31-2013 at 09:28 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Divided sums of 2 columns with denominator changing based on blank values in a column

    Assuming the data is A2:C4, put this formula in B5 and then copy to the right:

    =SUM(B$2:B$4) / SUMIF(B$2:B$4, "<>", $A$2:$A$4)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-31-2013
    Location
    OH, USA
    MS-Off Ver
    Excel 2003, docs.google.com
    Posts
    2

    Re: Divided sums of 2 columns with denominator changing based on blank values in a column

    Thank you for such a quick reply JBeaucaire. This is exactly what I was looking for. Now to incorporate it into something a little more complex. I think I was overcomplicating it.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Divided sums of 2 columns with denominator changing based on blank values in a column

    I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above to mark a thread as SOLVED. Thanks.

+ 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. Changing column values based on header values
    By CXsjr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2013, 12:11 PM
  2. [SOLVED] Compare 4 column values then insert a 5th columns value to a blank column/cell value
    By JasonKMcCoy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-27-2012, 06:01 PM
  3. Replies: 4
    Last Post: 08-01-2012, 08:55 AM
  4. [SOLVED] Excel 2007 : Changing denominator every nth cell
    By edenfaell in forum Excel General
    Replies: 9
    Last Post: 07-17-2012, 08:17 AM
  5. Replies: 6
    Last Post: 03-21-2006, 09:20 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