+ Reply to Thread
Results 1 to 10 of 10

Formula help for creating portfolio

  1. #1
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Exclamation Formula help for creating portfolio

    I am trying to create automated table which should updated basis the raw data entry. I have attached the workbook for working, I need help in getting formulae for YELLOW highlighted cells.

    Also for the stock name, which should not be repeated from the rows above them.

    It would be great help for me. Thanks!

    Rushi.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula help for creating portfolio

    Try this with two helper columns to simplify the formula

    Helper 1 marks the unique Stock line with a row number or zero
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Helper 2 gives you the row number for unique row number
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Use that row number to access the Stock name
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    USE SUMIF or SUMPRODUCT for the other formulas

    See the file
    Attached Files Attached Files

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Formula help for creating portfolio

    In "K3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    By pressing CTRL+SHIFT+ENTER & copy paste down.
    Other columns formula with simple sumifs.
    File attach for your ready ref.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Re: Formula help for creating portfolio

    Thanks Jose for such a quick reply!

    I have few points, It would be great if you could address those:
    1. In your solution in column I (i.e. Helper_2) from row number 44 formula shows error #NUM!. Will it create any problems as the number of entries will increase?
    2. Column L should add only +ve of the buy values, but here it adds both & at the end the sum shows "0" if I had sold those stocks. Is it possible to add only +ve number & similarly in column P it should add only -ve values?
    3. Similarly for SUMPRODUCT, suggest formula if I want to take only SUMPRODUCT of the only +ve buy quantity & corresponding buy rate. Also same for SUMPRODUCT of -ve buy quantity & & corresponding buy rate (be it -ve number).

    Thanks,
    Rushi.

  5. #5
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Re: Formula help for creating portfolio

    Thanks AVK for your help. I will go through the sheet, Will come back to you if anything is required.

  6. #6
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Re: Formula help for creating portfolio

    Hello @avk,

    Everything is fine in the solutions what you have proposed except column M & column Q. This are calculating simple average rates whereas I need Weighted Aaverage ((+ve buy quantity*Rate)/total +ve buy quantity). Similarly for the -ve buy quantities as well.

    Thanks for your time and efforts, really appreciated.
    Rushi.

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula help for creating portfolio

    Hi
    You can avoid that with this formula in I2 (Helper_2)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Re: Formula help for creating portfolio

    @avk,

    Please help me with Weighted Average.

    Thanks

  9. #9
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula help for creating portfolio

    See if this is what you want in M3 and drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    By the way what means +ve?

  10. #10
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Formula help for creating portfolio

    =IFERROR(SUMPRODUCT(($B$2:$B$182=$K3)*($D$2:$D$182>0),$D$2:$D$182*$E$2:$E$182)/SUMIFs($B$2:$B$182,$K3,$D$2:$D$182,">0"),0)

+ 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] Need help portfolio simulation
    By pulkownik in forum Excel General
    Replies: 11
    Last Post: 06-15-2013, 07:52 AM
  2. Covariance Matrix and Efficient frontier for a portfolio help
    By z71dawg101 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-03-2013, 11:33 PM
  3. Stock Portfolio Formula
    By WilsonsKM in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-18-2013, 12:56 PM
  4. Need help with Portfolio evaluation
    By Brad1951 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2012, 04:57 PM
  5. Replies: 0
    Last Post: 06-25-2012, 04:52 AM
  6. Replies: 0
    Last Post: 04-19-2011, 08:54 AM
  7. Let a formula chose the proper stocks to be added to a portfolio at the right time
    By pieterb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-12-2011, 06:29 AM
  8. Portfolio Performance Formula
    By Old Red One in forum Excel General
    Replies: 0
    Last Post: 04-24-2006, 12:15 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