A pure macro solution without formulas or UDF Sub GetMultipleDataSAS() Application.ScreenUpdating = False Columns("e").Clear On Error Resume Next For i = 3 To Cells(Rows.Count, "b").End(xlUp).Row sLr = Cells(Rows.Count, "i").End(xlUp).Row With Columns("I") Set c = .Find(What:=Cells(i, "b"), After:=Range("I2"), LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext) If Not c Is Nothing Then firstAddress = c.Address Do ms = ms & "/" & Cells(c.Row, "J") Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With Cells(i, "e") = Right(ms, Len(ms) - 1) ms = "" Next i Columns("e").AutoFit Application.ScreenUpdating = True End Sub
Don Guillett SalesAid Software dguille...@gmail.com From: Sam Mathai Chacko Sent: Monday, October 24, 2011 12:27 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Vlookup Function MultiResultLookedUp(varLookupValue, rngRange As Range) As String Dim lngLoop As Long Dim varArray varArray = rngRange For lngLoop = LBound(varArray, 1) To UBound(varArray, 1) If varArray(lngLoop, 1) = varLookupValue Then MultiResultLookedUp = MultiResultLookedUp & varArray(lngLoop, 2) & "/" End If Next lngLoop MultiResultLookedUp = Left(MultiResultLookedUp, Len(MultiResultLookedUp) - 1) End Function Regards, Sam Mathai Chacko (GL) On Mon, Oct 24, 2011 at 10:46 PM, Aamir Shahzad <aamirshahza...@gmail.com> wrote: Dear Experts, I want to pick the multi values like vlookup formula. Is there any way? Sheet attached. Can we prepare the any function e.g. (mylookup) which save in excel & when ever I use that function it picks the desired values like attached sheet. Regards, Aamir Shahzad -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- Sam Mathai Chacko -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel