Thread: Vlookup help
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Vlookup help

A simple VBA procedu
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 19/10/2007 by Bernard V Liengme
'

'
Range("A1:b1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("D1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("D1:E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("E1"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("D4:E4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
End Sub

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"madmxx22277" wrote in message
...
say I got a table like this
Bob 4
Charlie 7
George 4
Oliver 2
Henry 8

I am using the large command to get me the 3 lowest numbers, and using
vlookup to match the name up with it, so I should end up with
Oliver 2
Bob 4
George 4
but since the last ones are the same number I end up with,
Oliver 2
Bob 4
Bob 4

please help, is there a way I can have vlookup do its thing, but have it
not
be equal to another vlookup cell?