Results 1 to 6 of 6

Filter S&P500 companies

Threaded View

  1. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Filter S&P500 companies

    Have a look at the attached.

    Step 1/. Highlight Column "Fiscal Year" (C) then use Text to Columns to change the Text Value to Numbers.
    Text to Columns > "Click Finish"

    Step 2/.
    In a spare Column, I have used Column P, List the years you need to calculate.
    Then in a conveniant cell sum these values (O2)

    Step 3/. In L2
    =IF(A2<>A1,IF(SUMIF(A:A,A2,C:C)=$O$2,E2,""),"")
    Drag/Fill Down
    This assumes that your data is sorted on "Company ID Number" and each ID has no duplicate years.
    You now have all the company names that have entries for each of your required years.

    You could if you wish just filter out the blanks in this column and you get the result you need.
    However this does it for you.
    Step 4/. In M2 this array formula ( Must be confirmed with Ctrl+Shift+Enter NOT just Enter
    =IF(ROW()-ROW($M$3:$M$1001)+1>ROWS($L$2:$L$1000)-COUNTBLANK($L$2:$L$1000),"",INDIRECT(ADDRESS(SMALL((IF($L$2:$L$1000<>"",ROW($L$2:$L$1000),ROW()+ROWS($L$2:$L$1000))),ROW()-ROW($M$2:$M$1000)+1),COLUMN($L$2:$L$1000),4)))
    Drag/Fill Down
    This removes the blanks from Column K

    Step 5/. Conditional Format optional ..... See the workbook.

    Hope this helps
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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