Results 1 to 6 of 6

Using AND to check 2 conditions...

Threaded View

  1. #1
    Registered User
    Join Date
    12-31-2008
    Location
    Alaska, (not Anchorage)
    MS-Off Ver
    Excel 2010, 2016, and 365
    Posts
    78

    Using AND to check 2 conditions...

    Hello all-
    I'm trying to work an AND statement in to a formula so that if 2 conditions are met (fuel and type) then the date of that record will be displayed along with the other matched dates in ascending order on a report tab. This statement works for a single condition,

    =INDEX(data!$A$1:$A$100,SMALL(IF(data!$B$1:$B$100=$A$3,ROW(data!$A$1:$A$100)),ROWS($B$2:B3)))

    and this is the statement that I've been trying to get to work for two conditions,

    =INDEX(data!$A$1:$A$100,SMALL(IF(AND(data!$C$1:$C$100=$B$3,data!$B$1:$B$100=$A$3),ROW(data!$A$1:$A$100)),ROWS($B$2:B3)))


    Where am I dropping the ball here? I've also attached a workbook with this example in it.

    Thanks in advance for wisdom and insight shared.




    <data tab>

    date | type | fuel
    6/21/2011 | Blue Volvo | diesel
    6/21/2011 | Red Citroen | electric
    6/23/2011 | White Landcruiser | gasoline
    6/23/2011 | Green Ford | diesel
    6/23/2011 | Silver Toyota | electric
    6/23/2011 | White Landcruiser | diesel
    6/28/2011 | Blue Volvo | corn oil
    6/28/2011 | Red Citroen | electric
    6/28/2011 | Yellow Mazda | gasoline
    6/28/2011 | Green Ford | diesel
    7/2/2011 | White Landcruiser | electric
    7/2/2011 | Silver Toyota | electric
    7/2/2011 | Green Ford | diesel
    7/2/2011 | Yellow Mazda | corn oil
    7/3/2011 | White Landcruiser | diesel
    7/3/2011 | Blue Volvo | gasoline
    7/12/2011 | White Landcruiser | electric

    <report tab>

    White Landcruiser | electric
    7/2/2011
    7/12/2011

    White Landcruiser | diesel
    6/23/2011
    7/3/2011

    Red Citroen | electric
    6/21/2011
    6/28/2011
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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