+ Reply to Thread
Results 1 to 10 of 10

How to get an instant sum

  1. #1
    Registered User
    Join Date
    01-14-2016
    Location
    toronto
    MS-Off Ver
    2013
    Posts
    7

    How to get an instant sum

    I have the following form based on a table:
    Please Login or Register  to view this content.
    fields “empname” and”salary” are locked, but the working is field is able the be switched between “yes” and “No” by the operator by a click.

    Is it possible that the "summary" shows the instant sum of salaries of the employs whose working status is “yes”? For example all “working” are yes and summary shows 2700. But the operator clicks on the working status of Steve and changes it to NO, and the summary right away shows 1200.

    i am not sure if this is doable on a form or report.
    thank you

  2. #2
    Forum Contributor
    Join Date
    08-21-2012
    Location
    London
    MS-Off Ver
    Office 365 MAC
    Posts
    107

    Re: How to get an instant sum

    Perhaps SUMIF will work for you?
    Learner, making mistakes, asking daft questions.

  3. #3
    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,917

    Re: How to get an instant sum

    Hi, welcome to the forum

    I agree that you could probably use SUMIF() for this
    =sumif(criteria-range, criteria, sum-range)
    to give more detailed help, please upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

  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
    79,336

    Re: How to get an instant sum

    Is this not an Access query?
    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.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: How to get an instant sum

    You could use a DSUM function in a textbox.

  6. #6
    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,917

    Re: How to get an instant sum

    Quote Originally Posted by AliGW View Post
    Is this not an Access query?
    or perhaps pulled in from another app, numbers under "salary" look wonky

  7. #7
    Registered User
    Join Date
    09-24-2018
    Location
    India
    MS-Off Ver
    MS office standard 2013
    Posts
    2

    Post Re: How to get an instant sum

    I hope this post is closed otherwise i have pasted the SUMIF example


    --------------------------
    Click on the star if you think someone helped you
    Attached Files Attached Files

  8. #8
    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
    79,336

    Re: How to get an instant sum

    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!

  9. #9
    Registered User
    Join Date
    09-24-2018
    Location
    India
    MS-Off Ver
    MS office standard 2013
    Posts
    2

    Re: How to get an instant sum

    Quote Originally Posted by AliGW View Post
    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!
    Hi,

    I understood your message. This was a simple use of SUMIF function so i didn't gave an explanation, however i completely agree with you and will do the explanation from next time onwards

    Thanks!

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: How to get an instant sum

    @ariansman
    If you build your form based upon a query instead of bound to a form, then set the criteria in the yes/no field to yes. Then use an unbound text box and DSum in your form based upon the salary field.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Instant Comment Box
    By Sanecrazy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2012, 10:38 AM
  2. Instant Email Notification
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2010, 08:03 PM
  3. Excel Instant Messenger
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2008, 07:00 AM
  4. Instant Notification
    By Lotus123 in forum Excel General
    Replies: 1
    Last Post: 10-31-2007, 03:12 PM
  5. Instant results
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2007, 05:20 AM
  6. Instant calculations
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2007, 12:30 PM
  7. [SOLVED] Add Instant Totals use what feature?
    By bluemoon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-05-2006, 07:25 PM
  8. Hyperlinks Not Instant In 2007 ??
    By Mhz in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 07-14-2006, 10:50 PM

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