+ Reply to Thread
Results 1 to 15 of 15

How to calculated

  1. #1
    Registered User
    Join Date
    03-14-2017
    Location
    Pune
    MS-Off Ver
    Office 16
    Posts
    27

    Post How to calculated

    Hi,

    Please find attached file. In the file, if I select Location=All & Dept=All, then show all location & All Dept. total amount. Please help.
    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,853

    Re: How to calculated

    In O3 copied down:

    =IF($K$3="*ALL",SUMIFS($F$3:$F$16,$E$3:$E$16,N3),SUMIFS($F$3:$F$16,$E$3:$E$16,N3,$D$3:$D$16,$K$3))
    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
    Registered User
    Join Date
    04-04-2017
    Location
    The Netherlands
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: How to calculated

    Hello Pranvinilesh,

    try this:

  4. #4
    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,853

    Re: How to calculated

    StefanD - sorry for off-topic interjection:

    Although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: How to calculated

    Try

    =SUMIFS($F:$F,$C:$C,$K$4,$D:$D,$K$3,$E:$E,$N3)

    Change "*All" to "*"

  6. #6
    Registered User
    Join Date
    04-04-2017
    Location
    The Netherlands
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: How to calculated

    Dear AliGW,

    I found that I used somewhat the same formula as you used, Ill try to explain it a bit, Sorry for my misinterpretation of the forum customs, I am quite new to this forum after all.

    @Pranvinilesh: The key to this formula is to use SUMIFS, creating conditions in which your worksheet should SUM the data.

    This formula consists of two parts (Ill leave out the $-signs for the sake of readability)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You see, you'll want to check if your drop-down list contains *ALL. (shown in blue) If so, you need to SUM all numbers (shown in red).
    If not, you want it to check for the value in N3, and display all values corresponding with that specific value, by checking both N3 and K3(shown in green).

    I hope my explanation gives you insight in how this formula operates.

    Regards,

    StefanD
    Last edited by StefanD; 04-04-2017 at 09:30 AM.

  7. #7
    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,853

    Re: How to calculated

    I hope my explanation gives you insight in how this formula operates.
    I think you misunderstood the request. When you present a solution, it is fine to provide a workbook, but you should also say what the formulae are that you have used therein within the post itself. You don't need to explain the formulae unless the OP asks you to.

  8. #8
    Registered User
    Join Date
    03-14-2017
    Location
    Pune
    MS-Off Ver
    Office 16
    Posts
    27

    Re: How to calculated

    Thanks to all. In this file I have use drop down option. If I select "*ALL" then answer get. But if i select any other location or dept. instead of "*ALL" then answer get wrong. Please help. And thanks once again for help.

  9. #9
    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,853

    Re: How to calculated

    My formula, outlined in my first post above, works perfectly in your own file (see attached).
    Attached Files Attached Files

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How to calculated

    Try this, copied down...
    =SUMIFS($F$3:$F$16,$C$3:$C$16,IF($K$4="*all","*",$K$4),$D$3:$D$16,IF($K$3="*all","*",$K$3),$E$3:$E$16,N3)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Registered User
    Join Date
    03-14-2017
    Location
    Pune
    MS-Off Ver
    Office 16
    Posts
    27

    Re: How to calculated

    Yes your formula work, If i choose both location & dept = "*ALL", but if I change Dept. value any other like "Sales" instead of "*ALL" then answer not changed.

  12. #12
    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,853

    Re: How to calculated

    Try Ford's offering in post #10.

  13. #13
    Registered User
    Join Date
    03-14-2017
    Location
    Pune
    MS-Off Ver
    Office 16
    Posts
    27

    Re: How to calculated

    Thanks Ford's formula worked. Also thanks AliGW for your help. And AliGW next time also remember your advice for post.

  14. #14
    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,853

    Re: How to calculated

    The advice was for Stefan, not you. Glad you have your solution!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How to calculated

    Happy to help and thanks for the feedback

+ 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. difference between calculated field and calculated column in PowerpIvot
    By stephme55 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2016, 06:05 PM
  2. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  3. Replies: 2
    Last Post: 03-06-2009, 11:49 AM
  4. [SOLVED] PivotTable:Using a calculated field result in another calculated f
    By Alice in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-08-2006, 12:25 PM
  5. [SOLVED] pivot table formulas for calculated field or calculated item
    By Vicky in forum Excel General
    Replies: 3
    Last Post: 06-06-2006, 12:10 AM
  6. [SOLVED] how to change a calculated cell to = the calculated value
    By CAM in forum Excel General
    Replies: 4
    Last Post: 01-26-2006, 01:30 PM
  7. [SOLVED] how to create a calculated field from another calculated field?
    By Eldon in forum Excel General
    Replies: 0
    Last Post: 01-09-2006, 11:45 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