+ Reply to Thread
Results 1 to 6 of 6

Array formula that return City with two condition and have no Sales

  1. #1
    Registered User
    Join Date
    09-08-2014
    Location
    iran
    MS-Off Ver
    2013
    Posts
    32

    Array formula that return City with two condition and have no Sales

    Hi
    I want to return the name of cities that have no sale in specefic month and product. data is in the file.
    my question is urgent
    Attached Files Attached Files
    Last edited by ieumts; 02-07-2021 at 03:33 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Array formula that return City with two condition and have no Sales

    Try this:

    =IFERROR(INDEX(C:C,AGGREGATE(15,6,ROW($C$2:$C$7)/((IF(($A$2:$A$7=$I$1)*($B$2:$B$7=$I$2)=0,$C$2:$C$7,"")<>"")*(COUNTIF(K$1:K1,$C$2:$C$7)=0)),1)),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    09-08-2014
    Location
    iran
    MS-Off Ver
    2013
    Posts
    32

    Re: Array formula that return City with two condition and have no Sales

    Hi
    Thanks for your formula
    Your Formula Work good. but for example if the 7th Row is: Month:5 Product:A2 City:c2 TotaL Sale: 6000
    The formula return c2 that it is wrong.
    because in month=4 and product=a1, only c1,c3,c4 have no sale.
    The new file is attached.
    thanks
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Array formula that return City with two condition and have no Sales

    Hi
    try this in L2 and down:
    =IFERROR(INDEX($C$1:$C$6,AGGREGATE(15,6,(ROW($C$2:$C$6)/(($A$2:$A$6&$B$2:$B$6<>$I$1&$I$2))),ROWS($E$1:E1))),"")

  5. #5
    Registered User
    Join Date
    09-08-2014
    Location
    iran
    MS-Off Ver
    2013
    Posts
    32

    Re: Array formula that return City with two condition and have no Sales

    Hi
    that was not work true
    because the range of data is A1:D7 but your formula is including C6
    Thanks

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Array formula that return City with two condition and have no Sales

    An alternative, but needing a list of cities...
    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. [SOLVED] Index/Array and return all values matching a condition
    By sunriver61 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2020, 12:23 AM
  2. Return a Metro City after matching a mailing city with a suburb
    By themole in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-18-2018, 10:16 AM
  3. [SOLVED] Formula to total the sales of all product with condition
    By Manish_Gupta in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2017, 02:05 AM
  4. [SOLVED] Return the Index of an array BUT with an IF condition (or other filter...), Thanks!
    By bbernzy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-15-2013, 02:20 PM
  5. Replies: 5
    Last Post: 04-30-2013, 09:32 PM
  6. [SOLVED] Return an array based on condition
    By ecelaras in forum Excel General
    Replies: 10
    Last Post: 11-23-2012, 11:01 AM
  7. Sorting data (say first by customer city, then by $ sales) using Macro
    By lemontears88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2012, 03:02 PM

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