|
-
Mar 22nd, 2003, 07:28 PM
#1
Thread Starter
New Member
Newbie question---vb/excel
Hey,
I am a very inexperienced VBA programmer looking for some help.
I have two columns of varying length. In the first, I would like to find the minimum non-null value. Once the min value is found I would like to return the corressponding value in the 2nd column to a different cell.
Thanks,
H Turner
Last edited by heathturner; Mar 22nd, 2003 at 08:11 PM.
-
Mar 23rd, 2003, 03:53 AM
#2
New Member
Hi
Place this formula in any cell for a non VBA solution:
=VLOOKUP(MIN(A:A),A:B,2,FALSE)
Using VBA:
With Application.WorksheetFunction
Range("C1").Value = .VLookup(.Min(Columns("A")), Columns("A:B"), 2, False)
End With
The above assumes the minimum lookup value to be in column A and the offset(1column) returned value to be in column B
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|