+ Reply to Thread
Results 1 to 5 of 5

Check given set of conditions and return lowest date in other table

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    Netherlands
    MS-Off Ver
    2014
    Posts
    23

    Check given set of conditions and return lowest date in other table

    I'm struggling alot with comparing data and show a date. I'm just not able to get it working..
    I've added a example workbook to show how the data looks like.

    What I am trying to do is, compare the conditions in sheet (competence per station) and compare them with the dates a person/number got the competence. (Date Competence per person).

    So the conditions for station 10, are to have the competence A to I. These conditions will be remembered, this means the range A to I will be compared with the person's competences and give the lowest value (oldest date).

    It doesn't always be the same range, it could differ if you look at the conditions sheet. Example, station 25 has A to I and K, N & O. For this station it needs to compare these competences/cells with the other table containing the dates of a person and then show the oldest date.

    It would be great if it is possible to show it in the 'permission' sheet instead of yes/no.

    Is it even possible what I want in VBA?
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Check given set of conditions and return lowest date in other table

    Have you tried using the SMALL function in your formulae?

  3. #3
    Registered User
    Join Date
    06-18-2014
    Location
    Netherlands
    MS-Off Ver
    2014
    Posts
    23

    Re: Check given set of conditions and return lowest date in other table

    I just need to have a piece of code that remembers the columns in a range with cells containing "x". Then it finds the smallest number in those columns, but on a different sheet. I need this like in a function, so a formula. I just have no clue where to start. Small is probly the way to go, but how do I let the macro remember the columns with x's?

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    Netherlands
    MS-Off Ver
    2014
    Posts
    23

    Re: Check given set of conditions and return lowest date in other table

    Ok, i managed to get the ranges myself

    Please Login or Register  to view this content.
    This shows the ranges that I need to have in a formula in the cells with the formula.

    Now I only need to have a formula that calculates the minimumof the range, RangeX. I keep getting #VALUE! when I add:

    Please Login or Register  to view this content.
    Can't seem to get that to work, any help?
    How do I get the indirect function into this code?
    Last edited by jhonneyboy; 07-11-2014 at 08:00 AM.

  5. #5
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Check given set of conditions and return lowest date in other table

    The way I worked it out, if I'm understanding your needs, correctly, is, in the cells on the Permission tab, I changed the formulae to the following:

    =IF(SUMPRODUCT(('Competence per person'!$B2:$AA2="x")*('Condition per station'!$B$2:$AA$2="x"))>=COUNTIF('Condition per station'!$B$2:$AA$2,"x"),SMALL('Date Competence per person'!B2:AA2,1),"no")

    Is that what you're looking for, or am I not understanding your needs, correctly?

    -Z

+ 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. Replies: 8
    Last Post: 11-06-2014, 06:19 PM
  2. Need a formula to return the last (i.e. lowest row) value entered into a table
    By ianpwilliams in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 04:39 AM
  3. Check four conditions return TRUE or FALSE
    By mkvassh in forum Excel General
    Replies: 6
    Last Post: 11-16-2009, 07:26 AM
  4. Replies: 2
    Last Post: 07-06-2005, 07:05 AM
  5. Replies: 3
    Last Post: 01-17-2005, 08: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