+ Reply to Thread
Results 1 to 10 of 10

Formula with some match criteria

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Formula with some match criteria

    Hello!

    Im trying to find out a formula that looks for some values that matches a certain criteria. I have attached a small example where I explain better what I am looking for.
    I hope someone can help on this.

    Thank you very much.

    Regards,


    pezal
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula with some match criteria

    Try in J9 and copy down, this ARRAY formula.

    =iferror(INDEX($B$6:$B$19,SMALL(IF(($C$6:$C$19=K5)*($B$6:$B$19<=$K$6),ROW($B$6:$B$19)-5),ROW(B1))),"")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Formula with some match criteria

    Hi,

    Thanks for your quick reply. The formula didn't work because in J9 was displayed another value which didn't match the condition from Cell K5.
    The values that should been displayed in the cells from range(J9:J19) are for this case only: 16/4/13

    If the date from cell K6 would have been: 23/4/13
    Three values would appeared in range(J9:J19), which are: 16/4/13 ; 20/4/13 ; 21/4/13

    Thanks once again!

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula with some match criteria

    iferror(INDEX($B$6:$B$19,SMALL(IF(($C$6:$C$19=K5)*($B$6:$B$19<=$K$6),ROW($B$6:$B$19)-5),ROW(B1))),"")

    Yes. Correct. We have to do absolute the red part of the formula.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Formula with some match criteria

    Fotis! Thanks a lot. Exactly what I was looking for!!

    The only thing I forgot to add a small detail...

    The thing is that sometimes the dates from column B will repeat and only UNIQUE values I will need. Sorry about this.

    Thanks again man!

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula with some match criteria

    Don't worry! In Excel you can do almost everything!
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Formula with some match criteria

    WOW!

    That's it!! Thanks a lot, i really appreciate your help!!!
    I was stuck on this!!

    SOLVED!

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula with some match criteria

    Even we are the PIGS, for everyone else, we do something good....

    You are welcome! Thanks for the reb*

  9. #9
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Formula with some match criteria

    heheh yes!

    And just for curiosity, it is possible to avoid the column where we put the SUMPRODUCT formula? Or it maybe becomes too large the ARRAY formula...

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula with some match criteria

    Quote Originally Posted by pezalmendra View Post
    heheh yes!

    And just for curiosity, it is possible to avoid the column where we put the SUMPRODUCT formula? Or it maybe becomes too large the ARRAY formula...
    Perhaps....But.....

    1) The time is 02:00 am here...

    2) For sure it will becomes too large the ARRAY formula...

    And 3)..As i say in my Signature...KISS

+ Reply to Thread

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