Lookup formula help??

sezuh

Well-known Member
Joined
Nov 19, 2010
Messages
708
Hi,
in column "F" i have list In column "G" some numbers has been assigned to each row what i need lookup formula or any exel formula for that matter ,if
i put the number in column g to give me a result of the string of numbers fromcolumn "F".
here is an example;
Excel Workbook
FGHIJK
1listnum.lookup result
21 2 3111 2 3,4 5 6
31 4 7221 4 7,2 5 8
41 5 9331 5 9,2 6 7
51 6 8441 6 8,3 5 7
62 4 9
72 5 82
82 6 73
93 4 8
103 5 74
113 6 9
124 5 61
137 8 9
Sheet2

thanks in advance for any help,appreciate very much.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
First, place the following code in a regular module (Alt+F11 > Insert > Module > Copy/Paste > Alt+Q)...

Code:
[font=Verdana][color=darkblue]Function[/color] AConcat(a [color=darkblue]As[/color] [color=darkblue]Variant[/color], [color=darkblue]Optional[/color] Sep [color=darkblue]As[/color] [color=darkblue]String[/color] = "") [color=darkblue]As[/color] [color=darkblue]String[/color]
[color=green]' Harlan Grove, Mar 2002[/color]

    [color=darkblue]Dim[/color] Y [color=darkblue]As[/color] [color=darkblue]Variant[/color]

    [color=darkblue]If[/color] [color=darkblue]TypeOf[/color] a [color=darkblue]Is[/color] Range [color=darkblue]Then[/color]
    
        [color=darkblue]For[/color] [color=darkblue]Each[/color] Y [color=darkblue]In[/color] a.Cells
            AConcat = AConcat & Y.Value & Sep
        [color=darkblue]Next[/color] Y
    
    [color=darkblue]ElseIf[/color] IsArray(a) [color=darkblue]Then[/color]
    
        [color=darkblue]For[/color] [color=darkblue]Each[/color] Y [color=darkblue]In[/color] a
            AConcat = AConcat & Y & Sep
        [color=darkblue]Next[/color] Y
        
    [color=darkblue]Else[/color]
    
        AConcat = AConcat & a & Sep
    
    [color=darkblue]End[/color] [color=darkblue]If[/color]
    
    AConcat = Left(AConcat, Len(AConcat) - Len(Sep))
    
[color=darkblue]End[/color] [color=darkblue]Function[/color]
[/font]

Then try the following...

K2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUBSTITUTE(AConcat(IF($G$2:$G$13=J2,","&$F$2:$F$13,"")),",","",1)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top