+ Reply to Thread
Results 1 to 24 of 24

Ratio between Sum of Columns is not logical

  1. #1
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Post Ratio between Sum of Columns is not logical

    Hi.
    I have an excel table with three Columns. Each cell in column 3 is a multiplier of constant between 3.57 and 3.78 and the first column. The constants are in the second column.
    i.e. col1 * col2= col 3
    this is the table:

    Col1 ____ Col2 ____ Col3
    -2027.47 ____ 3.75 ____ -7594.77
    -3095.82 ____ 3.74 ____ -11582.71
    -528.97 ____ 3.78 ____ -2001.17
    -559.33 ____ 3.78 ____ -2114.5
    -579.34 ____ 3.70 ____ -2142.5
    -1017.48 ____ 3.70 ____ -3762
    -1025.66 ____ 3.70 ____ -3790
    -2023.24 ____ 3.71 ____ -7498.37
    641.74 ____ 3.69 ____ 2371
    919.03 ____ 3.60 ____ 3305.79
    -11042 ____ 3.73 ____ -41160.98
    -5890.66 ____ 3.73 ____ -21999.76
    -2275.86 ____ 3.74 ____ -8509.4
    -8537.12 ____ 3.73 ____ -31883.45
    -6639.5 ____ 3.73 ____ -24796.45
    -10248.6 ____ 3.73 ____ -38221.73
    -5000.81 ____ 3.71 ____ -18576.77
    -5020.84 ____ 3.71 ____ -18651.18
    -1617.82 ____ 3.73 ____ -6039.96
    5796.17 ____ 3.59 ____ 20788.78
    10483.96 ____ 3.59 ____ 37602.16
    917.89 ____ 3.57 ____ 3272.66
    7420.43 ____ 3.59 ____ 26614.4
    11283.23 ____ 3.59 ____ 40468.85
    -748.56 ____ 3.70 ____ -2767.6
    -40.05 ____ 3.70 ____ -148
    -10029.42 ____ 3.70____ -37107
    4954.66 ____ 3.58 ____ 17735.51
    2894.89 ____ 3.70 ____ 10707
    2011.03 ____ 3.57 ____ 7187.1
    4117.92 ____ 3.57 ____ 14716.46
    8387.64 ____ 3.57 ____ 29978.81

    -18119.96 ____ 4.17 ____ -75599.78

    The last row contains the sum of Col1 and Col3. But when I calculate the ratio between the 2 sums it is 4.17!!!!
    How can it be when the max ratio between each column cell is a max of 3.78??
    Please help
    Thanks in advance.
    Last edited by RamPowered; 04-16-2017 at 07:22 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Ratio between Sum of Columns is not logical

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Ratio between Sum of Columns is not logical

    This is because you have combination of positive and negative numbers here. To get rid of this you can use below formula for sum :
    Col1 :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Col3 :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then you will get the correct ratio.

  4. #4
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Ok, Sorry, I did not know, I am new here and I did not see an attachment option.
    I will follow your instructions.
    Thanks.

  5. #5
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by sanram View Post
    This is because you have combination of positive and negative numbers here. To get rid of this you can use below formula for sum :
    Col1 :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Col3 :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then you will get the correct ratio.

    Thank you for your answer.
    These numbers are real and I need the negative sign to sum the numbers.
    Why the negative value actually ruin the ratio?
    I also attach the excel file as I was instructed...
    Attached Files Attached Files
    Last edited by RamPowered; 04-16-2017 at 07:41 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Ratio between Sum of Columns is not logical

    You are calculating the weighted average and this is the basic of a weighted average. For example :
    2 X 3 = 6
    -2 X 3 = -6
    Now if you sum 6 and -6 then it will result 0. So you will get wrong average here. But if you sum 6 and absolute value of -6 then it will result 12 which will provide you the correct average. I think that makes sense now.

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Ratio between Sum of Columns is not logical

    maybe try this one: =SUMPRODUCT(C2:C33/A2:A33)/COUNT(B2:B33)

  8. #8
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by sanram View Post
    You are calculating the weighted average and this is the basic of a weighted average. For example :
    2 X 3 = 6
    -2 X 3 = -6
    Now if you sum 6 and -6 then it will result 0. So you will get wrong average here. But if you sum 6 and absolute value of -6 then it will result 12 which will provide you the correct average. I think that makes sense now.
    But it stays correct :
    -2 3 -6
    2 3 6

    0 3 0

    0*3=0

  9. #9
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Ratio between Sum of Columns is not logical

    But 0 divided by 0 is impossible. See the below example for more clarification.

    -2 X 3 = -6
    3 X 4 = 12

    -2 + 3 = 1
    -6 + 12 = 6

    Now what ?

  10. #10
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by sandy666 View Post
    maybe try this one: =SUMPRODUCT(C2:C33/A2:A33)/COUNT(B2:B33)
    Well This did the JOB! It gave 3.678!

    But i still do not understand why the sum of col1 is not *3.678 of col 3 but 4.17...

  11. #11
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Ratio between Sum of Columns is not logical

    If you couldn't understand from above 2 examples then I am undone. You need someone better than me to explain you. As a student of Statistics I can explain up to this. But may be a teacher of Statistics can describe more briefly.

  12. #12
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by sanram View Post
    But 0 divided by 0 is impossible. See the below example for more clarification.

    -2 X 3 = -6
    3 X 4 = 12

    -2 + 3 = 1
    -6 + 12 = 6

    Now what ?
    You have a point here...

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by RamPowered View Post
    Well This did the JOB! It gave 3.678!

    But i still do not understand why the sum of col1 is not *3.678 of col 3 but 4.17...
    the sum of the mean values is not the same as the mean of the sum values

  14. #14
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    I will explain my problem in more realistic way, in the real world.
    This excel is a part of summery report of trades in Foreign exchange of a friend of mine.
    The A column is the amount in dollars ($$) where negative is a buy operation and positive is a sell operation.
    the C column is the value in a Foreign currency where the conversion ratio between currencies is between 3.57 and 3.78 .
    The sum of all of his trades is the sum of column A which is -18119.96. in dollars.

    When he went to his bank account he expected to see something like (-18119.96*(max ratio of 3.78)) = -68493.45 value in his real currency, which is logical.

    If he lost 18119.96 dollars in his trades, isn't it logical to expect -68493.45 in his currency?

    well what he saw is the value of -75599.78 which is the sum of all the trades in his foreign currency, and the ratio is 4.17.

    This does not seem logical!

    He will expect a ratio of 3.678 as sandy666 helped to find...

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Ratio between Sum of Columns is not logical

    Aha! Now it makes sense. calculate the sum/ratio of the positive and negative numbers separately...
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by Glenn Kennedy View Post
    Aha! Now it makes sense. calculate the sum/ratio of the positive and negative numbers separately...
    OK! you are right. Now it make sense.
    we have 3.59 ratio for the positive values and 3.72 ratio for the negative ones. This make sense.

    So we will expect a ratio between 3.59 and 3.72 to multiply the sum of column A with, but we still get 4.17...
    and when it comes to money, it is more significant...
    Last edited by RamPowered; 04-16-2017 at 08:48 AM.

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Ratio between Sum of Columns is not logical

    Yes. It's an artefact caused by your mix of +ve and -ve numbers.

    i do not understand what you are saying/asking here:

    "So we will expect a ratio between 3.59 and 3.72 to multiply column A with, but we still get 4.17..."

  18. #18
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by Glenn Kennedy View Post
    Yes. It's an artefact caused by your mix of +ve and -ve numbers.

    i do not understand what you are saying/asking here:

    "So we will expect a ratio between 3.59 and 3.72 to multiply column A with, but we still get 4.17..."
    I ment why isnt it right to multiply the sum of the negative and positive values with the (mean of 3.59 and 3.72 )...
    which is 3.655 and not 4.71...

  19. #19
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Ratio between Sum of Columns is not logical

    I think this is not Excel problem but math

  20. #20
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    Quote Originally Posted by sandy666 View Post
    I think this is not Excel problem but math
    You are absolutely right

  21. #21
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Ratio between Sum of Columns is not logical

    So wait for shg and he will explain it with details (if he will want do that) or look for math forum

  22. #22
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Ratio between Sum of Columns is not logical

    Are you happy enough with the overall result of the problem, that you can get an answer that makes sense?





    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  23. #23
    Registered User
    Join Date
    04-16-2017
    Location
    Israel
    MS-Off Ver
    2007
    Posts
    11

    Re: Ratio between Sum of Columns is not logical

    I think I get it now after separating the numbers to pos and neg.
    It now makes sense.
    The sum is -18119.96 but the negative part of it (77948.55) which is bigger then the positive part is multiplied by a higher ratio (3.72) and the positive part
    which is smaller (59828.59) is multiplied by a lower ratio (3.59).
    We can not multiply -18119.96 as is with a ratio. We must separate and calculate the negative and positive parts with their ratio.

    Thank you very much Glenn to help me understand this.
    Thank you all.
    Last edited by RamPowered; 04-16-2017 at 09:18 AM.

  24. #24
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Ratio between Sum of Columns is not logical

    Aha!! It's sound good that you have got it now.

+ 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] Change the ratio between the columns and the gaps between them, stacked column char
    By Trebor777 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-22-2016, 10:41 AM
  2. Index Match Based on Ratio of Two Columns
    By AK de FLA in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-25-2016, 09:36 PM
  3. How to calculate a number based on the given ratio. For example a 2:3 ratio.
    By Ayoub99k in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-11-2015, 08:15 AM
  4. Replies: 1
    Last Post: 07-31-2013, 07:58 AM
  5. [SOLVED] Measurement for highest value and ratio between two columns
    By Zarlex in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-23-2013, 07:59 AM
  6. Excel 2007 : Create logical columns and refer it
    By sudhakarnraju in forum Excel General
    Replies: 5
    Last Post: 12-31-2010, 03:00 PM
  7. [SOLVED] Divide x/y should give Ratio x:y,How to express ratio in excel
    By arvind3738 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-10-2006, 03:29 AM

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