+ Reply to Thread
Results 1 to 4 of 4

Multiple criterai using a common key, referencing multiple data sources

  1. #1
    Registered User
    Join Date
    09-03-2014
    Location
    Brisbane, Australia
    MS-Off Ver
    2010 Standard
    Posts
    2

    Multiple criterai using a common key, referencing multiple data sources

    Hi there,

    I have a data pool that uses the following hierachy

    System (unique)
    Tag (unique)
    Sheet (not unique)

    e.g. Every instance of a Sheet is associated with a Tag, and every Tag associated with a System

    At the moment I can generate an excel spreadsheet that lists all of the tags against their systems, and a spreadsheet that lists all of the sheets against their tags. e.g.

    Worksheet1
    System; Tag
    1; 1A
    1; 1B
    2; 2A
    2; 2B

    Worksheet2
    Tag; Sheet; Completed Date
    1A; Sheet1; nil
    1A; Sheet2; nil
    1B; Sheet1; 01/01/2014
    1B: Sheet2; 01/01/2014
    2A; Sheet2; 01/02/2014
    2B; Sheet3; nil
    2B; Sheet1; 01/03/2014
    2B; Sheet2; 01/04/2014

    I want to produce a formula that can count the total number of a particular Sheet in a particular System (using the Tag to link the two Worksheets) where the Completed Date is nil. I have been playing around with SUMPRODUCT but can't think of how to get this to work. As an example, what formula would I use to tell me that there is one Sheet2 in System 1 that has not been completed?

    Any assistance would be greatly appreciated.
    Last edited by mls82; 09-03-2014 at 06:59 PM. Reason: spelling and added some extra dummy data.

  2. #2
    Forum Contributor
    Join Date
    07-29-2014
    Location
    Oz
    MS-Off Ver
    2010
    Posts
    142

    Re: Multiple criterai using a common key, referencing multiple data sources

    With your data like this:

    System Tag Sheet Completed Date
    1 1A Sheet1 nil
    1 1A Sheet2 nil
    1 1B Sheet1 1/01/2014
    1 1B Sheet2 1/01/2014
    2 2A Sheet2 1/02/2014
    2 2B Sheet3 nil
    2 2B Sheet1 1/03/2014
    2 2B Sheet2 1/04/2014

    =COUNTIFS(D:D,"nil",B:B,"=1*",C:C,"Sheet1") ===> gives you a count if nil / system 1 / sheet1

    Obviously you can adjust the criteria as needed to return different combinations.
    Don't forget to ☆ me if I helped you!

  3. #3
    Registered User
    Join Date
    09-03-2014
    Location
    Brisbane, Australia
    MS-Off Ver
    2010 Standard
    Posts
    2

    Re: Multiple criterai using a common key, referencing multiple data sources

    Thanks Danerida,

    That's not quite what I am looking for. I am aware that I can use COUNTIF's if I was to put all of the data into a single worksheet. I'm more looking at a single formula that I can use with the data in its native format, which means I am not making extra work for myself each time I import the data.

    What the formula needs to do is the following

    for each line in Worksheet1
    - if System = "1",
    -- store var = value of Tag
    -- for each line in Worksheet2
    --- if Tag = var && Completed Date = "nil"
    ---- count++
    --- close if
    -- close for
    - close if
    close for
    Last edited by mls82; 09-04-2014 at 12:23 AM.

  4. #4
    Forum Contributor
    Join Date
    07-29-2014
    Location
    Oz
    MS-Off Ver
    2010
    Posts
    142

    Re: Multiple criterai using a common key, referencing multiple data sources

    Quote Originally Posted by mls82
    As an example, what formula would I use to tell me that there is one Sheet2 in System 1 that has not been completed?
    My formula does exactly that.

    Quote Originally Posted by mls82 View Post
    Thanks Danerida,
    That's not quite what I am looking for. I am aware that I can use COUNTIF's if I was to put all of the data into a single worksheet. I'm more looking at a single formula that I can use with the data in its native format, which means I am not making extra work for myself each time I import the data.
    You are welcome, but I don't understand what the rest of this means. What is your data's native format?

    You might be better served to put together a sample spreadsheet showing how you receive the data, and how you would like it to be laid out with your results.

+ 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. [SOLVED] Countif multiple criterai within 1 column
    By ctbanker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2014, 03:46 PM
  2. VBA Pivot Table - Multiple Tables - Multiple Sources of Data
    By ryanmorris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2012, 03:13 PM
  3. Replies: 0
    Last Post: 12-12-2011, 07:27 PM
  4. VLOOKUP using multiple data sources
    By SalientAnimal in forum Excel General
    Replies: 2
    Last Post: 12-24-2010, 04:26 AM
  5. Question about multiple data sources
    By c in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2005, 01:06 AM

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