Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Fellows
How can I get the Max number from a collection thata has only numbers Thanks GC |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you will just have to loop through all the items.
RBS wrote in message ups.com... Hi Fellows How can I get the Max number from a collection thata has only numbers Thanks GC |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub getmax()
MsgBox Application.Max(Columns("d")) End Sub -- Don Guillett SalesAid Software wrote in message ups.com... Hi Fellows How can I get the Max number from a collection thata has only numbers Thanks GC |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don,
What relationship has Columns("d") with the OP's collection? --- Regards, Norman "Don Guillett" wrote in message ... Sub getmax() MsgBox Application.Max(Columns("d")) End Sub -- Don Guillett SalesAid Software wrote in message ups.com... Hi Fellows How can I get the Max number from a collection thata has only numbers Thanks GC |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Ok thanks, If I loop thru the collection how can I get the max? On Nov 7, 5:02 pm, "Norman Jones" wrote: Hi Don, What relationship has Columns("d") with the OP's collection? --- Regards, Norman "Don Guillett" wrote in l... Sub getmax() MsgBox Application.Max(Columns("d")) End Sub -- Don Guillett SalesAid Software wrote in message oups.com... Hi Fellows How can I get the Max number from a collection thata has only numbers Thanks GC- Hide quoted text -- Show quoted text - |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One approach:
Sub EFG() Dim col As Collection Dim i As Long, ii As Long Dim lmax As Long Dim itm As Variant Set col = New Collection For i = 1 To 30 ii = Int(Rnd() * 100 + 1) On Error Resume Next col.Add ii, CStr(ii) On Error GoTo 0 Next For Each itm In col If itm lmax Then lmax = itm End If Next MsgBox "Max value is: " & lmax End Sub -- Regards, Tom Ogilvy wrote in message oups.com... Ok thanks, If I loop thru the collection how can I get the max? On Nov 7, 5:02 pm, "Norman Jones" wrote: Hi Don, What relationship has Columns("d") with the OP's collection? --- Regards, Norman "Don Guillett" wrote in l... Sub getmax() MsgBox Application.Max(Columns("d")) End Sub -- Don Guillett SalesAid Software wrote in message oups.com... Hi Fellows How can I get the Max number from a collection thata has only numbers Thanks GC- Hide quoted text -- Show quoted text - |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I find this way to do it
iva=col(1) For i = 1 To col.Count On Error GoTo Fin If ival col(i + 1) Then ival = col(i + 1) End If Next i wrote: Hi Fellows How can I get the Max number from a collection thata has only numbers Thanks GC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
template for dvd collection | Excel Discussion (Misc queries) | |||
maximum number of members in a collection | Excel Programming | |||
Collection Key | Excel Programming | |||
Collection | Excel Programming | |||
cell number in collection | Excel Programming |