Results 1 to 20 of 20

Display multiple search results by column

Threaded View

Declan.Ryan Display multiple search... 11-09-2012, 05:16 AM
Sindhus Re: Display multiple search... 11-09-2012, 05:18 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 05:28 AM
Sindhus Re: Display multiple search... 11-09-2012, 05:43 AM
Sindhus Re: Display multiple search... 11-09-2012, 06:20 AM
:) Sixthsense :) Re: Display multiple search... 11-09-2012, 06:02 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 06:35 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 05:49 AM
crzu Re: Display multiple search... 11-09-2012, 05:54 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 06:00 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 07:01 AM
Sindhus Re: Display multiple search... 11-09-2012, 07:14 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 07:23 AM
Sindhus Re: Display multiple search... 11-09-2012, 07:31 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 07:32 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 07:37 AM
Sindhus Re: Display multiple search... 11-09-2012, 07:40 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 08:04 AM
Sindhus Re: Display multiple search... 11-09-2012, 08:15 AM
Declan.Ryan Re: Display multiple search... 11-09-2012, 08:51 AM
  1. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Display multiple search results by column

    Quote Originally Posted by Declan.Ryan View Post
    this one has headers
    Try the below code in standard module

    Function GetMatches(LValue As Range, LRng As Range, ResRng As Range) As String
    Dim i As Long
    
    For i = 1 To LRng.Cells.Count
        If WorksheetFunction.CountIf(LRng, LValue.Value) Then
            If LRng.Cells(i).Value = LValue.Value Then
                GetMatches = GetMatches & ResRng.Cells(i).Value & " "
            End If
        End If
    Next i
    
    GetMatches = Trim(GetMatches)
    
    End Function

    =GetMatches(LookupValue,LookupRange,ResultRange)

    In B1 cell
    =GetMatches(A1,E1:E12,F1:F12)
    Drag it down.

    Refer the attached excel for details.

    Edit: Protect the range =getmatches(A1,$E$1:$E$12,$F$1:$F$12)
    Attached Files Attached Files
    Last edited by :) Sixthsense :); 11-09-2012 at 06:24 AM. Reason: Code Tag Applied


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1