PDA

View Full Version : removing duplicates from table in memory



JZB
08-16-2010, 08:45 AM
Hi Guys

I have a column which i have committed to memory using the following loop

Dim strategies(500, 1)

For i = 1 To nlastrow

strategies(i, 1) = Sheets("Preview").Cells(i, 17)

End If

Next i

the table data has gaps. i.e. range a1 is blank, a2 is blank, a3 is "jb", a4 is blank etc. in total there are approx 11 cells of the 500 which are populated with data

i wish to cut the range to 11 rows and then leverage off this to do a loop

how do i 1. remove the duplicates and delete all rows which have no data? :dunno hope this is straight forward

what is the syntax to count the number of rows with data i.e 11. :banghead:

this may be quite straight forward but i am finding it hard to leverage off any recording from the ribbon of thee functions. i assume they are different re dimensions.

any help would be much appreciated.

many thanks

JZB