How to extract list of entries by month & without duplicates.

BigMoe

New Member
Joined
Nov 1, 2014
Messages
18
***I'm using Excel 2003***

I'm working on a spreadsheet to track my stock trading activities for one year. I used the following formula to give me a list of all the stocks traded without duplicates:
=INDEX(D$5:D$4244,MATCH(0,COUNTIF(J$4:J4,D$5:D$4244),-1))

However, I'm having difficulty doing the same for a list of stocks traded by month without any duplicates. Basically, I need help in adding some sort of month component to the above formula, or a completely new formula that will do the trick. Below is a miniature mock-up of that portion of the spreadsheet.

Many thanks in advance.

CDEF
Date TradedStock SymbolsSymbols - JanSymbols - Feb
1/1/15AAPLAAPL
1/1/15RIGRIG
1/1/15XOMXOM
1/1/15FB
1/1/15UNH
1/2/15FBTWTR
1/2/15AAPLVLO
1/2/15RIG
1/2/15
1/2/15
1/3/15UNH
1/3/15AAPL
1/3/15TWTR
1/3/15VLO
1/3/15

<tbody>
</tbody>
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Maybe Im missing something here, but why not just reference the jan column, instead of the Stock column?
 
Upvote 0
The Jan column is the column I'm asking for help with. I'm just showing the results i would like to have.
 
Last edited:
Upvote 0
kind of complex but maybe with a couple of modifications to the table to just the month abbreviation.

I also believe that with 2003 you need to have the Analysis tool pack add in installed to access the frequency function but I could be mistaken.

Row 1 with the unique count for each month could be hidden if you wanted.

Below is a link to the sheet.

https://app.box.com/s/1bwvvnxz50jhstqrh8axut7si6h9h4gb


Excel 2012
CDEFG
1Unique Count612
2Date TradedStock SymbolsJanFebMar
31/1/2015AAPLAAPLRIGAAPL
41/1/2015RIGRIGTWTR
51/1/2015XOMXOM
61/1/2015FB
71/1/2015UNH
81/2/2015FBVLO
93/2/2015AAPL
102/2/2015RIG
111/2/2015
122/2/2015
131/3/2015UNH
143/3/2015AAPL
153/4/2015TWTR
161/3/2015VLO
171/3/2015

<tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
E1{=SUM(IF(FREQUENCY(IF($D$3:$D$17<>"",IF(TEXT($C$3:$C$17,"mmm")=E$2,MATCH($D$3:$D$17,$D$3:$D$17,0))),ROW(C$3:C$17)-ROW(C$3)+1),1))}
E3{=IF(ROWS(E$2:E2)>E$1,"",INDEX($D$3:$D$17,SMALL(IF(FREQUENCY(IF($D$3:$D$17<>"",IF(TEXT($C$3:$C$17,"mmm")=E$2,MATCH($D$3:$D$17,$D$3:$D$17,0))),ROW(C$3:C$17)-ROW(C$3)+1),ROW(C$3:C$17)-ROW(C$3)+1),ROWS(E$3:E3))))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
Thanks so much Weazel!
You actually also solved my next question with your two formulas. Really appreciate it. (y)
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,953
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top