Find unique values from an Autofiltered list

Passman

Board Regular
Joined
May 23, 2007
Messages
103
I have a worksheet with over 8000 rows of data in a range BB20:BV8359. Using VBA I have autofiltered this range with 2 criteria, column BC ="Newcastle" and column BD="Wed".

I am trying to get a list of unique dates from cell BE20 to the last row, but only of the filtered data not the entire list. I have searched the forum and come up with nothing.

I would be grateful for some help with VBA code to get a unique list of date starting in cell Range("DA1")

Thanks for your help
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I found a way to achieve what I was trying to do. If it is of any help to anyone in the future I have posted my solution below

Code:
            Sheets("TempSheet").Visible = True
            Sheets("TempSheet").Cells.Delete Shift:=xlUp
            lRow = Range("BE" & Rows.Count).End(xlUp).Row
            Range("BE20:BE" & lRow).SpecialCells(xlCellTypeVisible).Copy
            Sheets("TempSheet").Activate
            Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                :=False, Transpose:=False
            c = Cells(Rows.Count, 1).End(xlUp).Row
            Range("$A$1:$A$" & c).RemoveDuplicates Columns:=1, Header:=xlNo
            c = Cells(Rows.Count, 1).End(xlUp).Row
            If c >= 16 Then
                Range("A" & c - 15 & ":A" & c).Copy
            Else
                Range("A1:A" & c).Copy
            End If
            Sheets("Dashboard").Activate
            Range("BW3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                :=False, Transpose:=False
            Sheets("TempSheet").Visible = False

I'm sure there must be a more elegant way to achieve the same thing but it seems to work.
 
Upvote 0

Forum statistics

Threads
1,214,840
Messages
6,121,895
Members
449,058
Latest member
Guy Boot

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