+ Reply to Thread
Results 1 to 3 of 3

SUM COUNTIF Issue for recording payments on an attendance sheet

  1. #1
    Registered User
    Join Date
    07-16-2018
    Location
    Sydney, Australia
    MS-Off Ver
    Mac 2016
    Posts
    1

    SUM COUNTIF Issue for recording payments on an attendance sheet

    Hello,
    I'm making an attendance spreadsheet for my local cycling club to record payments. The spreadsheet uses text to mark attendance (o=paid, x=unpaid, f=free session). A SUM COUNTIF function is used to 'assign' numerical values to these (E9:N9). The value can change each session due to what facilities are used.

    The problem however is that some members like to pay in advance with 'credit'. B12 is credit input value, E12:N12 is attendance, C12 is credit function: =B12-(SUM(COUNTIF(E12:XFD12,{"x","o","f"})*{0,5,0}))

    What I am trying to achieve is to have a credit input (B12) which then automatically updates all unpaid sessions ('x') to paid sessions ('o'). Once, the credit value (C12) reaches 0, I want it to 'reset' but leave the paid sessions as paid, so that a new Credit input can be given and the function to occur once again but now with new values.

    I have partially got it working; but it only works if members pay solely with credit - which they don't. The credit value continues into negative values. I tried using the MAX function to prevent any value less than 0 but the calculations continued to treat it as a negative value anyway.

    The ideal is to it so that the credit function (C12) continues to 0 and then 'resets' (allowing credit input figure to be removed and a new one added) but remembers that the values were paid via credit).

    My questions:
    1. Is there a way to make the function reset when all the credit is used up?
    2. The function also needs to use variable numerical values for each entry/ session. The cost of each session is E10:N10. Can this be done using a COUNTIF?
    3. How to prevent credit from going below zero?
    4. Is there a way to have the credit input (B12) deleted once its used in the function (C12)?

    Apologies if i missed any important information (this is my first post).

    Thank you,
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: SUM COUNTIF Issue for recording payments on an attendance sheet

    This would require a macro. So, it is possible, but takes you to the next level of Excel knowledge.

    Paul

  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,929

    Re: SUM COUNTIF Issue for recording payments on an attendance sheet

    Hi, welcome to the forum

    You cannot have a formula AND data in the same cell (manually enter X in D12, but if C12 has a value, apply that to D12 to change X to O)

    As Pauley says, you will need VBA for that. Can you 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

+ 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. Payments Recording
    By redcat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2016, 04:04 PM
  2. [SOLVED] Excel 2016 Sort routine issue - recording macro has sheet name in sort routine
    By pongmeister in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-05-2016, 02:45 PM
  3. Attendance tracking - Countif's and %
    By frigidiceman916 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-01-2016, 11:58 AM
  4. [SOLVED] MATCH FUNCTION Issue: Tracking Attendance for a Rolling Year
    By SRWilson87 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-27-2015, 11:40 AM
  5. [SOLVED] New Web Query Recording Macro Issue
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2012, 08:40 AM
  6. Problem recording COUNTIF formula with Macros
    By JenthePA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2012, 04:15 PM
  7. [SOLVED] Mac issue with macro recording user login & date (run time error '
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-01-2005, 01: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