+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : CountA and CountIF

  1. #1
    Registered User
    Join Date
    07-28-2008
    Location
    Moncton
    MS-Off Ver
    2003
    Posts
    53

    CountA and CountIF

    I am trying to do a tally of a hockey pool sheet based on trades made. The first 5 trades are 5 dollars each and the 6th trade is $15. I have the player # in column A, the player's name in column B and the player's salary value in column C. I have 107 teams to tally so I would like to have a formula that would tally up the number of trades from one to five a team has made multipled by five dollars and the 6th trade is multiplied by 15 dollars. When I do the formula I get a total of $40 no matter if there is data in the cell or not.

    Any help is most appreciated.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: CountA and CountIF

    How about:

    =IF(COUNTA(A:A)>5, ((COUNTA(A:A)-5) * 15) + 25, COUNTA(A:A) * 5)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-28-2008
    Location
    Moncton
    MS-Off Ver
    2003
    Posts
    53

    Re: CountA and CountIF

    It seems to be counting the all the cells even if they are empty and doing the calculations. What if the team didn't make all if its trades?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: CountA and CountIF

    Post a sample workbook with sample data and sample desired results.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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