+ Reply to Thread
Results 1 to 12 of 12

Matching multiple criteria in all sheets and returning values

  1. #1
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Matching multiple criteria in all sheets and returning values

    Hi all

    Need Help!!

    I want to find across multiple sheets if column D has "ss141425c" (this is employee code) and column E "ELE" and then I want the corresponding value from Column M.

    The purpose of this is:
    I have 100 employees, each day there are many transactions and hence multiple excel sheets. All I am trying is to build is a consolidated transaction history against each employee. There are different types of transactions like "ELE", "CCP", "FAA", "CEA". So, I am intending a dynamic macro where it takes staff code for each employee from Column E and type of transaction in the column header say Column "AC" and searches thru all sheets in the workbook and return value from Column N in each sheet. If there are more than two values in a month, then second value should be in beside cell instead of writing over the first value.

    Hope I am not asking much. Help me out plz.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Matching multiple criteria in all sheets and returning values

    Are all sheets concerned or is there a list where to search in?
    Where to put the data ?
    Of course a short example will help
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Matching multiple criteria in all sheets and returning values

    See the example attached and comment
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Matching multiple criteria in all sheets and returning values

    Hello PCI !!!

    You were almost perfect, but can the "Arg1" be a range like say E1:E10 so that I can search for all the employees, not just for an individual and get values against each name.


    And Yes, all the sheets are concerned, except the Sheets "Index" and "Emp List". I am putting the data in "Emp List" sheet itself from "Column AB6".

    I have attached example sheet bit modifying what u did earlier.
    Attached Files Attached Files
    Last edited by Ravana; 06-20-2015 at 10:59 AM.

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Matching multiple criteria in all sheets and returning values

    See remake attached
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Matching multiple criteria in all sheets and returning values

    I am attaching an example sheet (data desensitized) what I am looking for...plz look at it.

    Hope this explains betters what I am trying to put in words.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Matching multiple criteria in all sheets and returning values

    See attached
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Matching multiple criteria in all sheets and returning values

    @PCI...u r amazing...

    Since ELE is one type of transaction I shall fill the data in AA and AB Columns.

    As I said there are other type of transactions like "CCP"; to attain this I will change Arg as "CCP" but how to get that data in AC and AD columns.

    Similarly for transaction "FAA", I will change Arg as "FAA" but how to get that data in AE and AF columns...

    What I mean is for each employee there might be different transactions, so I want to bring all into one sheet side by side.

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Matching multiple criteria in all sheets and returning values

    Another run with the selection of the transaction
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Matching multiple criteria in all sheets and returning values

    PCI

    Everything runs smoothly...EXAMPLE SHEET2 IS simply awesome, however, only for ELE transactions, data is in column M; for CCP it is in H and for FAA it is in I...they change based on transaction(sry for that)...so ur 2nd example sheet is awesomely coded but I cannot use it...I am stuck with Example sheet 1 and I modified code for various transactions..basically I wrote additional macros changing Arg(s).


    Now, is there a way, where I can add hyperlink to the values, so that when I click on a value, it jumps directly to that sheet???

    What if I hide some rows where I am putting the data i.e EMP LIST...say if I hide B to H columns,then should I keep changing the ff.offset value.. (Example Sheet1)??
    Last edited by Ravana; 06-20-2015 at 04:56 PM.

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Matching multiple criteria in all sheets and returning values

    "What if I hide some rows where I am putting the data i.e EMP LIST...say if I hide B to H columns,then should I keep changing the ff.offset value.. (Example Sheet1)?? "
    NO don't change anything, it works like that
    "hyperlink to the values"
    It is another story in the way the code has been prepared, it will be easier to prepare another macro to do this specific job, open another thread to avoid mixing the topics.

  12. #12
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Matching multiple criteria in all sheets and returning values

    As said, I will open a new thread by posting the your code for assistance on hyperlinks ...hope some help may come.

    And no changing the EMP LIST as you said.

    Thanks again PCI....hope to c u in another thread, where u shall help me in hyperlinks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiple cells, multiple sheets, multiple criteria matching
    By Drudnits1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-17-2014, 12:12 PM
  2. Replies: 2
    Last Post: 06-08-2014, 09:47 PM
  3. [SOLVED] Two criteria Index Match on multiple sheets returning multiple values
    By Joak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2014, 10:03 AM
  4. [SOLVED] Help, Formula for Matching Like Values Across 2 Sheets and Returning A Value
    By youngmp502 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2013, 08:52 PM
  5. [SOLVED] Matching Cells in multiple sheets then returning the value of a cell in the same row..
    By AdamCassar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2013, 09:31 PM

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