+ Reply to Thread
Results 1 to 3 of 3

Return a Result Based on 2 Criteria

  1. #1
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    Return a Result Based on 2 Criteria

    Hello everyone

    Please see attached. I am trying to write a formula that will fill up column K and L based on the Dept # and Acct.

    For example, for K2: return the Line if the Dept # in column I matches that in column C and if the Acct falls within the range indicated by the From (col D) and To (col E) columns.

    The desired results are in the Desired Result tab.

    I would really appreciate any help on this.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Return a Result Based on 2 Criteria

    Try this in K2:

    =IF(AND(I2=C2,J2=MEDIAN(D2:E2,J2)),A2,"")
    If I've helped U pls click on d *Add Reputation

  3. #3
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    145

    Re: Return a Result Based on 2 Criteria

    Hi,

    try this:
    Excel 2013 32 bit
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    1
    Line
    Description
    Dept #
    From
    To
    Dept #
    Acct
    Line
    Description
    2
    900
    Mfg Costs 1
    00
    4010
    4070
    00
    4010
    =INDEX($A$2:$A$11,MATCH(1,(I2=$C$2:$C$11)*((J2>=$D$2:$D$11)*(J2<=$E$2:$E$11)),0))
    =INDEX($B$2:$B$11,MATCH(1,(I2=$C$2:$C$11)*((J2>=$D$2:$D$11)*(J2<=$E$2:$E$11)),0))
    3
    900
    Mfg Costs 1
    00
    4200
    4300
    00
    4205
    =INDEX($A$2:$A$11,MATCH(1,(I3=$C$2:$C$11)*((J3>=$D$2:$D$11)*(J3<=$E$2:$E$11)),0))
    =INDEX($B$2:$B$11,MATCH(1,(I3=$C$2:$C$11)*((J3>=$D$2:$D$11)*(J3<=$E$2:$E$11)),0))
    4
    1000
    Freight
    01
    4310
    4311
    03
    4350
    =INDEX($A$2:$A$11,MATCH(1,(I4=$C$2:$C$11)*((J4>=$D$2:$D$11)*(J4<=$E$2:$E$11)),0))
    =INDEX($B$2:$B$11,MATCH(1,(I4=$C$2:$C$11)*((J4>=$D$2:$D$11)*(J4<=$E$2:$E$11)),0))
    5
    1100
    Mfg Costs 2
    02
    4320
    4340
    05
    4702
    =INDEX($A$2:$A$11,MATCH(1,(I5=$C$2:$C$11)*((J5>=$D$2:$D$11)*(J5<=$E$2:$E$11)),0))
    =INDEX($B$2:$B$11,MATCH(1,(I5=$C$2:$C$11)*((J5>=$D$2:$D$11)*(J5<=$E$2:$E$11)),0))
    6
    1100
    Mfg Costs 2
    03
    4345
    4350
    04
    4700
    =INDEX($A$2:$A$11,MATCH(1,(I6=$C$2:$C$11)*((J6>=$D$2:$D$11)*(J6<=$E$2:$E$11)),0))
    =INDEX($B$2:$B$11,MATCH(1,(I6=$C$2:$C$11)*((J6>=$D$2:$D$11)*(J6<=$E$2:$E$11)),0))
    7
    1200
    Depreciation
    00
    4360
    4365
    8
    1200
    Depreciation
    00
    5245
    5245
    9
    1300
    Mfg Costs 3
    05
    4370
    4699
    10
    1300
    Mfg Costs 3
    05
    4701
    4999
    11
    1400
    Facility Insurance
    04
    4700
    4700
    Sheet: Initial

+ 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. Formula To Return A Result Based On A Set Of Criteria
    By antrosenthal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2016, 11:43 AM
  2. Return the earliest result and latest result with criteria
    By PFDave in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-26-2016, 07:20 AM
  3. [SOLVED] Return result based on multiple criteria..
    By Frazzfreeman in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-02-2014, 03:47 AM
  4. Lookup two criteria and return a third criteria as result. Aaaargh!
    By dearthofjoy in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-08-2013, 12:13 PM
  5. Replies: 7
    Last Post: 09-06-2013, 11:59 PM
  6. Return result from two criteria
    By Ben4481 in forum Excel General
    Replies: 2
    Last Post: 09-13-2010, 10:15 AM
  7. Return Result based on Multiple Criteria
    By franciz in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-20-2009, 01:30 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