Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Trouble getting Unique Dates from Range

Mark wrote:
The difficulty is that I have this procedure evaluating a number of columns,
some have dates, others do not... how can I have items that were originally
dates return as dates.


in that case, you don't have to use the match function for a vb array.
for example,

Dim UniqueList() As Variant
Dim cell_value As Variant
Dim i As Long

'...

For Each cCell In rng
cell_value = cCell.Value
If Not IsError(cell_value) Then
If cell_value < "" Then
For i = 0 To counter - 1
If UniqueList(i) = cell_value Then Exit For
Next
If i counter - 1 Then
ReDim Preserve UniqueList(0 To counter)
UniqueList(counter) = cell_value
counter = counter + 1
End If
End If
End If
Next cCell

--
HTH,

okaizawa
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count unique dates within each unique ID CD27 Excel Worksheet Functions 6 August 15th 09 03:15 PM
Identifying unique dates in a row of cells containing dates... cdavidson Excel Discussion (Misc queries) 9 October 13th 06 08:43 PM
Identifying unique dates in a range of cells containing dates... cdavidson Excel Discussion (Misc queries) 4 October 13th 06 03:30 PM
Identifying unique dates within a range of cells containing dates cdavidson Excel Discussion (Misc queries) 0 October 12th 06 08:19 PM
Trouble with dates...... DavidMunday Excel Worksheet Functions 0 June 27th 05 08:50 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"