+ Reply to Thread
Results 1 to 4 of 4

Sorting data with multiple conditions.

  1. #1
    Registered User
    Join Date
    11-04-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Sorting data with multiple conditions.

    Hi everyone.

    I'm working on making a calander in excel that can sort data to show when a project will take place, and I feel as if I've gone about this the wrong way as it's getting complicated and it's not a flexible method.

    An example of the sorting code is =IF(AND($F$3=E$14,$E$3=E15,$C$3="North"),$B$3,IF(AND($F$4=E$14,$E$4=E15,$C$4="North"),$B$4,IF(AND($F$5=E$14,$E$5=E15,$C$5="North"),$B$5,IF(AND($F$6=E$14,$E$6=E15,$C$6="North"),$B$6,IF(AND($F$7=E$14,$E$7=E15,$C$7="North"),$B$7,IF(AND($F$8=E$14,$E$8=E15,$C$4="North"),$B$8,IF(AND($F$9=E$14,$E$9=E15,$C$9="North"),$B$9,IF(AND($F$10=E$14,$E$10=E15,$C$10="North"),$B$10,IF(AND($F$11=E$14,$E$11=E15,$C$11="North"),$B$11,"")))))))))

    Even though this seems to work, it can only show 1 result, but I have situations where there are more than 1 scenarios meeting the condtions. I've attached the file so this can make sense.

    Many thanks

    Project Calander.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Sorting data with multiple conditions.

    Im hoping that you have Excel 2007.

    Please try this function

    In F19 (Across F19 to X22)

    =IFERROR(LOOKUP(2^15,1/(($C$3:$C$11=$D19)*($E$3:$E$11=F$15)*($F$3:$F$11=F$14)),$B$3:$B$11),"")

    or

    =IFERROR(INDEX($B$3:$B$11,MATCH(1,INDEX((($C$3:$C$11=$D19)*($E$3:$E$11=F$15)*($F$3:$F$11=F$14)),0),0)),"")
    Attached Files Attached Files
    Last edited by ramananhrm; 11-04-2013 at 07:40 AM.
    Please click 'Add reputation', if my answer helped you.

  3. #3
    Registered User
    Join Date
    11-04-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Sorting data with multiple conditions.

    Hi, thanks.

    That seems to produce the same result as in my previous code. If you play around with the input data table to create the situation where there are two projects in the same location, year and quater it only shows one result.

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sorting data with multiple conditions.

    I feel like, if you already have the data nicely tabulated, trying to grind it into a calender like this is the wrong approach.

    I would push towards a pivot table--see attached.
    Attached Files Attached Files

+ 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. Macro for filtering raw data,copy/ pasting and sorting based on conditions
    By amazingjeffery in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2013, 02:45 AM
  2. Excel 2007 : Sorting based on multiple conditions
    By hani9041 in forum Excel General
    Replies: 10
    Last Post: 03-12-2012, 08:33 AM
  3. Multiple conditions to get data
    By mrd4u in forum Excel General
    Replies: 3
    Last Post: 11-29-2011, 12:21 PM
  4. How can I remove multiple data by multiple conditions?
    By FlorinS in forum Excel General
    Replies: 4
    Last Post: 08-23-2009, 02:01 PM
  5. Excel 2007 : sorting data if conditions are met..
    By bjh3a in forum Excel General
    Replies: 0
    Last Post: 06-03-2009, 11: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