View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 1
Default Clarification - UDF to give position of item If list was Alpabetic

I have noticed the possibility of comparing strings with and < an
strangely this seems to work. This macro runs down column A and pic
out the highest "value" string.

'-----------------------------------------
Sub test()
Dim MyString As String
Dim Rw As Long
'---------------------
MyString = ""
Rw = 1
'---------------------
While ActiveSheet.Cells(Rw, 1).Value < ""
If ActiveSheet.Cells(Rw, 1).Value MyString Then
MyString = ActiveSheet.Cells(Rw, 1).Value
End If
Rw = Rw + 1
Wend
MsgBox (MyString)
End Sub
'----------------------------------------

--
Message posted from http://www.ExcelForum.com