View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Return of Cell Location

Perhaps something like:

Sub FindMin()
Set r = Selection
v = Application.WorksheetFunction.Min(r)
For Each rr In r
If rr.Value = v Then
MsgBox (rr.Address)
Exit Sub
End If
Next
End Sub

--
Gary''s Student - gsnu200902


"William Wolfe" wrote:

I am running VB code in Excel 2007. I execute a min function and now I want
to know what cell contained the min value.

How do I do this?

Thanks,