+ Reply to Thread
Results 1 to 5 of 5

Countif to show totals in userform

  1. #1
    Registered User
    Join Date
    04-24-2020
    Location
    USA
    MS-Off Ver
    WA
    Posts
    64

    Countif to show totals in userform

    Hi everyone!

    I have a simple user form that I like two textboxes to show totals of each criteria (under the header status: In and out).


    Userform controls

    txtIn for a total of all tools in (from column c)
    txtOut for a total of all tools out(from column c)


    I have attached 3 screenshots of sheet, code, and userform. What I have so far is not working, I am not able to get this to work. Am I missing something here? Thank you all!!!
    Attached Images Attached Images

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Countif to show totals in userform

    Your CountIf formula is wrong. But its not clear what you want to count.

    All entries "In". If so the line should be
    Please Login or Register  to view this content.
    All entries "In" and Deptartment "A". If so,
    Please Login or Register  to view this content.
    Note the function CountIfs

    This will put the value in your myResult variable.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    04-24-2020
    Location
    USA
    MS-Off Ver
    WA
    Posts
    64

    Re: Countif to show totals in userform

    mikerickson,

    I made the correction, but I am not seeing the totals in the userform. I think I am doing this backward. In the txtIn, I have this: Private Sub txtIN_Change()
    Call AddIn
    End Sub

    Thank you!

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Countif to show totals in userform

    The userform you showed has two text boxes for the result, but no way for the user to specify what department's information they want to see.
    (You still haven't clarified if you want to count all IN values or only the IN values from one department).

  5. #5
    Registered User
    Join Date
    04-24-2020
    Location
    USA
    MS-Off Ver
    WA
    Posts
    64

    Re: Countif to show totals in userform

    Thank you, sir, got it fixed now! Thank you!!

+ 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 show separate grand totals?
    By enathe in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-25-2014, 11:57 AM
  2. [SOLVED] when filtering i want sub totals to show certain criteria only
    By butjef in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2013, 08:34 AM
  3. COUNTIF totals across an entire workbook
    By pjcassidy in forum Excel General
    Replies: 6
    Last Post: 04-02-2013, 10:50 AM
  4. Show totals with Data Table
    By Q Westion in forum Excel General
    Replies: 0
    Last Post: 08-08-2012, 11:09 AM
  5. How do i get a COUNTIF formula to sum totals?
    By necht_angel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-13-2012, 05:14 PM
  6. userform is large.....how to use scrollbar of userform to show all of the userform
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2010, 04:11 PM
  7. Countif totals
    By DIM TIM in forum Excel General
    Replies: 3
    Last Post: 11-18-2007, 11:24 AM
  8. [SOLVED] How to make a cell show totals
    By Don in forum Excel General
    Replies: 1
    Last Post: 08-04-2005, 09:05 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