finding min values address and getting value from same column

N

nefarious24

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
 
A

Alseikhan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top