+ Reply to Thread
Results 1 to 26 of 26

Sumproduct with substraction and ifs

  1. #1
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Sumproduct with substraction and ifs

    How do i do this?
    (in file)
    Attached Files Attached Files
    Last edited by LibreOffice; 11-14-2020 at 08:00 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    In B11 copied down:

    =SUMIFS($C$2:$C$6,$B$2:$B$6,"Buy",$A$2:$A$6,A11)-SUMIFS($C$2:$C$6,$B$2:$B$6,"Sell",$A$2:$A$6,A11)

    You will need to change commas to semi-colons for your Dutch locale:

    =SUMIFS($C$2:$C$6;$B$2:$B$6;"Buy";$A$2:$A$6;A11)-SUMIFS($C$2:$C$6;$B$2:$B$6;"Sell";$A$2:$A$6;A11)

  4. #4
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    See post #3.

  6. #6
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Thank you very much, works great.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  8. #8
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Could you also tell me how to calculate the percentage per coin. take eth and bitcoin as 100% and then calculate how much % eth is out of that and how much % bitcoin is out of that 100%.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    What would you expect the results to be for your sample?

    Maybe this:

    =SUMIFS($C$2:$C$6,$B$2:$B$6,"Buy",$A$2:$A$6,A11)/SUMIFS($C$2:$C$6,$B$2:$B$6,"Buy")

    Format the result cell as percentage.

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    11
    Eth
    3
    98.68%
    12
    Bitcoin
    0.035
    1.32%
    Sheet: Sheet3
    Last edited by AliGW; 11-14-2020 at 08:24 AM.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    Or maybe you mean this:

    =SUMIFS($B$11:$B$12,$A$11:$A$12,A11)/SUM($B$11:$B$12)

  11. #11
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    It gives me a error somehow.
    Attached Files Attached Files

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    Try this:

    =IF(G3="","",SUMIFS($F$3:$F$31,$B$3:$B$31,B3)/SUM($F$3:$F$31))

  13. #13
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    It actually should be focust on the dollar instead of the coins because they all have a different value. then the % wont work

    more like
    Please Login or Register  to view this content.
    Last edited by LibreOffice; 11-14-2020 at 09:04 AM.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    If you've resolved it, please mark the thread as solved.

  15. #15
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    i will, however it wasn't solved, but i think this formula comes close to it.
    The % coins bought but then in money should be calculated per coin based upon 100% and now it calculates the % of coins instead of money invested.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Sumproduct with substraction and ifs

    OK - sorry, I'm not following the newly attached sheet, then, and I am running short of time today. I'll leave it for someone else to have a look at.

  17. #17
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Ok
    This is what should happen

    Looking at colomn I (ratio, right side) you see 20% bitcoin meaning that this is what i'm aiming for to buy.
    Colomn H (ratio, left side) is the % that i currently have of bitcoin.

    Colomn F (holdings) is what works right now and it tells you how many coins i have on the other tab (ledger) per coin.
    Colomn G (also holdings) should calculate how many coins i should buy if i want to have colomn H (ratio left) on sync with colomn J (ratio, right)

    So it should look like:
    0.195 / 0.20 19 / 20%


    Then the ROI should be 1609%
    and the margin 94,2%
    Attached Files Attached Files
    Last edited by LibreOffice; 11-14-2020 at 09:49 AM.

  18. #18
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Could anyone help me out?

  19. #19
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Sumproduct with substraction and ifs

    Post deleted
    Last edited by kvsrinivasamurthy; 11-22-2020 at 07:43 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  20. #20
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    bumps up,,.......

  21. #21
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Sumproduct with substraction and ifs

    So it should look like:
    0.195 / 0.20 19 / 20%
    It may help someone propose a solution if you could tell us how you arrived at 19?
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  22. #22
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Sure.
    (total amount paid for bitcoin / (total amount invested for bitcoin / 100)) / 100)

  23. #23
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Sumproduct with substraction and ifs

    Looking at the file attached to post #1 it would seem that the total amount paid for bitcoin is $600, however I don't know what the total invested for bitcoin would be.
    Please remember that you are the expert on the topic of investments, we are here to help you convert your calculations on the Portfolio sheet into Excel formulas/code.
    Let us know if you have any questions.

  24. #24
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    Would you be willing to look at the entire post nmr 17 for me?

  25. #25
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    anyone out there who understand this?

  26. #26
    Registered User
    Join Date
    09-25-2020
    Location
    Netherlands
    Posts
    19

    Re: Sumproduct with substraction and ifs

    The formula for H3 is
    Please Login or Register  to view this content.
    But it should only calculate the dollar amount and not the btc amount in it.

    P3 now is
    Please Login or Register  to view this content.
    But K3 will be removed and needs to be replaced with the numbers of total current bitcoin on the tab ledger. How?

    Same goes for
    R3
    Please Login or Register  to view this content.
    Replace K3 with only bitcoin from ledger.
    Last edited by LibreOffice; 12-13-2020 at 07:27 AM.

+ 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] Substraction two columns
    By merko30 in forum Excel General
    Replies: 11
    Last Post: 07-07-2016, 05:13 AM
  2. [SOLVED] Please help with substraction?
    By momchil.vladov in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2014, 08:54 AM
  3. substraction
    By faisal.ta in forum Excel General
    Replies: 1
    Last Post: 03-31-2014, 02:13 PM
  4. Substraction
    By bablubg in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-19-2012, 05:33 AM
  5. Columns SUBSTRACTION or something
    By masster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-31-2006, 03:59 PM
  6. [SOLVED] addition or substraction
    By FGOMEZ in forum Excel General
    Replies: 3
    Last Post: 04-12-2006, 04:45 PM
  7. Help - date substraction
    By TAKTOUKA in forum Excel General
    Replies: 17
    Last Post: 05-23-2005, 02:41 AM

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