View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default how do I copy streaming data values into excel

Hummm, still not getting it, but anyway. Here are a few ways to identify
uniques or dupes:
With data in ColA and ColB:
=IF(NOT(ISERROR(MATCH(A1:A6,B1:B6,0))),A1:A6,"")
this is entered as Ctrl+Shift+Enter

=IF(ISERROR(MATCH(A1:A6,B1:B6,0)),A1:A6,"")
Ctrl+Shift+Enter

With data just in ColA:
=SUMPRODUCT((A2:A78<"")/(COUNTIF(A2:A78,A2:A78&"")))

You could try this too:
=IF(COUNT(A1:A20)<ROW(A1),"",INDEX(A1:A20,MATCH(SM ALL(A1:A20,ROW(A1)),A1:A20,0)))

This is nice too:
=IF(B1=0,"",IF(COUNTIF($A$1:$A$1700,$B$1:$B$1700) 0,A1,""))

This may do it:
Sub Uniques()
Dim i As Integer
i = 1
Do Until Cells(i, 1).Value = "" '(as long as your data is in column 1)
If Cells(i, 1) = Cells(i + 1, 1) Then
Else
Cells(i, 1).Copy
Cells(i, 5).PasteSpecial xlValues '(this pastes into column E)
End If
i = i + 1

Loop
Range("E5:E1000").Sort Key1:=Range("E5"), Order1:=xlAscending

Columns("E:E").Select
Selection.Sort Key1:=Range("E1"), Order1:=xlAscending ',
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select

End Sub

HTH,
Ryan---


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"RB Smissaert" wrote:

You need to describe better how the data is coming in.
Can the Worksheet_Change event pick it up?

RBS


"morningstar333" wrote in message
...
I have streaming data coming into an excel spread sheet. I would like to
count how many times each time a unique number displays and what that
number
is. Can anyone help?