View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Mansfield[_2_] John Mansfield[_2_] is offline
external usenet poster
 
Posts: 15
Default need help finding unique numbers ( to 2.d.p).

Hi, the following macro will extract unique values. The
input range is Rng1 and the output range is Rng2.

Sub ListUniqueVal()

Dim Rng1 As Range
Dim Rng2 As Range
Dim Cell As Range
Dim UniqueValues As New Collection

Set Rng1 = Range("B4:C10")
Set Rng2 = Range("E4")

On Error Resume Next
For Each Cell In Rng1
UniqueValues.Add Cell.Value, CStr(Cell.Value)
Next Cell

For Each Item In UniqueValues
Rng2.Value = Item
Set Rng2 = Rng2.Offset(1, 0)
Next Item

End Sub


John Mansfield
pdbook.com

-----Original Message-----
Hi! I'm doing a sweepstake:
http://www.standardsbigbid.com/londo...nt/php/Help.ph

p#works
and thought this would be the best news group to discuss

the
possibilities...I know for a fact (via other news groups/

forums) that the
following amounts, so far, are not unique:

£1.00, £1.01, £1.11,£1.13, £1.18 £1.45, £1.49, £1.75,

£2.00, £2.33, £2.63,
£3.00, £3.11, £3.26, £3.32, £3.57, £4.00, £4.64, £5.00,

£5.23£5.73, £6.00,
£6.17,£6.19, £7.00, £7.57, £7.58, £7.77, £7.83, £8,00,

£8.53, £8.58, £8.68,
£8.71, £9.57, £9.87, £10.00, £10.23, £10.89, £11.00,

£11.14, £11.17, £11.50,
£11.63, £11.71, £11.73, £12.00, £12.27, £12.34, £13.00,

£13.02, £13.13,
£13.18, £14.00, £14.02, £14.14, £14.89, £15,00, £15.56,

£19.73, £19.76,
£20.00, £22.22, £23.52, £27.47, £29.09 £31.91, £687.65



Thanks for listening

theshak



.