Results 1 to 7 of 7

Thread: Lookup Data From Multiple Sheets

  1. #1
    Senior Member
    Join Date
    Mar 2013
    Posts
    146
    Rep Power
    0

    Lookup Data From Multiple Sheets

    I want to use the function to search for the employee code of Sheet No. 1 to No. 3
    Attached Files Attached Files
    Last edited by Admin; 01-29-2014 at 09:24 PM.

  2. #2
    Senior Member alansidman's Avatar
    Join Date
    Apr 2012
    Posts
    125
    Rep Power
    13
    This link should give you a clear example of what you need to do to make it work.

    https://groups.google.com/forum/#!to...el/UeAYuh8LAN4

  3. #3
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    13
    Or VBA solution.
    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
    
        On Error Resume Next
        If Target.Address = "$D$5" Then
            For j = 1 To 3
                sn = Sheets(j).Columns(1).Find(Target.Value, , xlValues, xlWhole).Resize(, 2)
                If Err = 0 Then
                    y = y + 1: Range("E5") = sn(1, 2)
                    Exit For
                End If
                Err.Clear
            Next
            If y = 0 Then Range("E5").ClearContents: MsgBox "Employee name not found", vbInformation, "Sorry"
        End If
       
    End Sub

  4. #4
    Senior Member
    Join Date
    Mar 2013
    Posts
    146
    Rep Power
    0
    Thank you very much on this link Mr. Alancisdman
    Thank you very much, Mr Bakerman on this code
    But you can solve this by formula (Index)
    I hope so, if you could? The best solution by the formula
    I am using Office 2003
    Thanks again for help

  5. #5
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    13
    On Sheet4 make a named range (A1 to A3) called MySheets containing Sheet1, Sheet2, Sheet3.
    In Sheet4!E5 put next formula. Remember that this is an Array-formula. (Ctrl-Shift-Enter)

    PHP Code:
    =VLOOKUP(D5,INDIRECT("'"&INDEX(MySheets,MATCH(1,--(COUNTIF(INDIRECT("'"&MySheets&"'!A2:A20"),D5)>0),0))&"'!A2:B20"),2,0

  6. #6
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    If there are not too much sheets, you could also try this one.

    =LOOKUP("zzzz",CHOOSE({1,2,3,4},"",INDEX(Sheet3!$B $2:$B$12,MATCH(D5,Sheet3!$A$2:$A$12,0)),INDEX(Shee t2!$B$2:$B$12,MATCH(D5,Sheet2!$A$2:$A$12,0)),INDEX (Sheet1!$B$2:$B$12,MATCH(D5,Sheet1!$A$2:$A$12,0))) )
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  7. #7
    Senior Member
    Join Date
    Mar 2013
    Posts
    146
    Rep Power
    0
    very very good
    Thank you all

Similar Threads

  1. Get Data For Specific Date From Across Multiple Sheets
    By paul_pearson in forum Excel Help
    Replies: 8
    Last Post: 08-09-2013, 04:36 PM
  2. Replies: 2
    Last Post: 04-15-2013, 02:23 PM
  3. Replies: 2
    Last Post: 03-21-2013, 10:38 PM
  4. Replies: 2
    Last Post: 11-08-2012, 01:15 PM
  5. Replies: 7
    Last Post: 03-06-2012, 07:49 AM

Posting Permissions

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