+ Reply to Thread
Results 1 to 5 of 5

How to figure out that Stock A (for example) is held in both Portfolio 1 and 3

  1. #1
    Registered User
    Join Date
    10-28-2019
    Location
    London
    MS-Off Ver
    MS Office Standard 2013
    Posts
    2

    How to figure out that Stock A (for example) is held in both Portfolio 1 and 3

    Many thanks in advance for any help in this matter!

    I've attached my problem as an image.

    I have three portfolios on the left, each containing a selection of stocks.

    I've then organised this into a table, with a list of the unique stocks in one column, and the names of each portfolio in their own columns. What is the formula that I would need to type in that would figure out that Stock A (for example) is held in both Portfolio 1 and 3?

    As an extra question, I currently plan on creating the list of unique stocks by copy & pasting the whole list, and then pressing the 'remove duplicates' button under the Data tab. This will be a pain to repeat every time I add a new portfolio with a new selection of stocks etc., so is there any way to automate that process as well?

    Really appreciate any help on this.
    Attached Images Attached Images
    Last edited by AliGW; 10-28-2019 at 11:38 AM.

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: hopefully a simple vlookup-related question...

    Assuming that your table is in E and to right, then in F2, under Portofolio 1: =countifs($a:$a,f$1,$b:$b,$e2)
    For totals in sum, =countif($b:$b,$e2)
    For unique list in E2: =INDEX($b1:$b100,MATCH(0,COUNTIF($e$1:e1,$b1:$b100),0)), array entered using Ctrl+Shift+Enter
    Click the * to say thanks.

  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,719

    Re: How to figure out that Stock A (for example) is held in both Portfolio 1 and 3

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    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.

  4. #4
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    Re: How to figure out that Stock A (for example) is held in both Portfolio 1 and 3

    I'm thinking countifs. If you attach a worksheet, it would be easier to figure out the actual formula.

    The second part you are probably looking for a macro.

  5. #5
    Registered User
    Join Date
    10-28-2019
    Location
    London
    MS-Off Ver
    MS Office Standard 2013
    Posts
    2

    Re: hopefully a simple vlookup-related question...

    Thank you PaulM100, that was incredibly helpful!

+ 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] Complex Question, May be Related to VLookUp or Max? Selecting Most Recent Date/Status
    By jet05c in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-18-2018, 06:56 PM
  2. Simple VLookup question
    By trevor2524 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-01-2017, 10:52 AM
  3. =if(vlookup simple question
    By daltonhsu in forum Excel General
    Replies: 3
    Last Post: 09-11-2012, 11:54 PM
  4. Simple VLOOKUP Question
    By Steve0492 in forum Excel General
    Replies: 6
    Last Post: 07-25-2011, 01:52 PM
  5. Simple Vlookup question (hopefully)
    By david_pt in forum Excel General
    Replies: 2
    Last Post: 07-23-2010, 04:19 PM
  6. A simple VLOOKUP question
    By shilock in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-01-2007, 03:07 PM
  7. Simple VLOOKUP question
    By magoobee in forum Excel General
    Replies: 2
    Last Post: 07-01-2007, 02:01 PM

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