+ Reply to Thread
Results 1 to 6 of 6

Sumif formula excluding and including a category value based on the dropdown selection

  1. #1
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    842

    Sumif formula excluding and including a category value based on the dropdown selection

    Dear Experts,

    Please find here sample workbook, The output formula in Report tab Cell C4:C6 is covering the Service Hours as well from Monthwise Summary tab which is non monetary part.

    Dear Experts, I do expect when i select the All option from the dropdown then only the monetary value should be added and displayed with Currency format for the particular Account Manager excluding the Service Hours but when i do select the Service Hours option from the dropdown then i do expect only the Service Hours numbers which is i am getting from the current formula but that i do expect in the number format.

    Rest all other dropdowns options, i do expect in the currency format as well except Service Hours.

    Dear Experts, i have mentioned my expected results in the sample workbook. Request to you please do provide your precious expertise and valuable support.

    Many thanks and kind regards,

    Neilesh
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,882

    Re: Sumif formula excluding and including a category value based on the dropdown selection

    Why should the return value NOT include service hours when ALL is selected? That is counter-intuitive.

    There are much easier ways of setting this up.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sumif formula excluding and including a category value based on the dropdown selection

    In C4 of the 'Report' worksheet, try this:

    =IF(Working!$E$1="ALL",SUMIFS('Monthwise Summary'!G$4:G$24,'Monthwise Summary'!B$4:B$24,B4,'Monthwise Summary'!C$4:C$24,"<>Service Hours"),SUMIFS('Monthwise Summary'!G$4:G$24,'Monthwise Summary'!B$4:B$24,B4,'Monthwise Summary'!C$4:C$24,"Service Hours"))
    Format C4:C7 as Currency.

    You can then apply Conditional Formatting to make C4:C7 show as a number when the drop down shows "Service Hours" like this:

    Select C4:C7 > Conditional Formatting > New Rule > Use a formula
    =Working!E$1="Service Hours"
    Format: Number > Number > 0 Decimal Places > OK > OK

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sumif formula excluding and including a category value based on the dropdown selection

    I just realized that there will likely be more that you are looking for than what you included in your expected results. The following will work for all of the dropdown options.

    Try this in C4:

    =IF(Working!$E$1="ALL",SUMIFS('Monthwise Summary'!G$4:G$24,'Monthwise Summary'!B$4:B$24,B4,'Monthwise Summary'!C$4:C$24,"<>Service Hours"),INDEX('Monthwise Summary'!G$4:G$24,INDEX(MATCH(B4&Working!E$1,'Monthwise Summary'!B$4:B$24&'Monthwise Summary'!C$4:C$24,0),0)))

  5. #5
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    842

    Re: Sumif formula excluding and including a category value based on the dropdown selection

    Thank you so much Dear Expert 63falcondude for your precious phase and valuable support. Your provided solution worked perfectly. Thank you so much once again.

    Regards,

    Neilesh

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sumif formula excluding and including a category value based on the dropdown selection

    You're welcome. Thanks for the rep!

+ 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. How to automate the selection of second dropdown value based on first dropdown value
    By laxminarayana in forum Word Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2014, 06:32 PM
  2. Update formula in excel based on dropdown selection
    By XLNB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2014, 03:17 PM
  3. Replies: 2
    Last Post: 10-07-2013, 11:06 AM
  4. Replies: 1
    Last Post: 07-03-2013, 10:50 AM
  5. [SOLVED] Formula for Last 30 Days Excluding Saturday, but including Sunday
    By AlphaSkidz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-08-2013, 02:23 PM
  6. Cull dropdown list options based on selection in another dropdown
    By Kiffar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2012, 01:53 AM
  7. Replies: 5
    Last Post: 09-30-2012, 10:43 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