Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

finding min values address and getting value from same column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nefarious24@gmail.com - 21 Mar 2006 22:50 GMT
ok here is what i have.

      A     B     C      D         E
1      V     W     X      Y
2    1.95  1.55   1.75   2.05   #Display

now in cell E2 i want it to find the minimum value from A2 to D2 and
display the letter above that minimum values column found in row 1
(V,W,X or Y).

so in this example i want W to be displayed in Cell E2.

thank you,
Jonathan
Alseikhan - 22 Mar 2006 00:47 GMT
This should do the trick:

Sub test()
Dim rng As Range
Worksheets("Sheet1").Range("A2:D2").Select
Set rng = Selection.Find(What:=Application.min(Selection)
Lookat:=xlWhole, LookIn:=xlValues)
Range("E2") = rng.Offset(-1, 0)
End Sub

Alseikha
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.