+ Reply to Thread
Results 1 to 8 of 8

How to countif a specific column based on a cell text value.

  1. #1
    Registered User
    Join Date
    03-22-2015
    Location
    Australia
    MS-Off Ver
    Office 2011
    Posts
    3

    How to countif a specific column based on a cell text value.

    Hi All,

    current_round cell reference is textual and changes depending on the date (it may read "Round 1" "Round 2" etc
    Headers along Row 1 and textual information under each header (some cells will be blank). Headers are "Round 1" "Round 2" etc
    The information beneath each header is either "Paid" or "Unpaid" (or blank)
    What I WANT to be able to do is have a formula which checks 'current_round', and then goes along each header until it finds it, and then counts the number of times 'Paid' appears in that columns and multiplies it by a dollar value to give me the total money paid for the current round (round_cont).

    I think I need to do something with INDEX but for the life of me, I can't work out exactly how. I've tried adapting several formulas I've found online but with no luck... The cell ranges (including the headers) are labelled as season_pd_header. (you'll already probably realise from the formula below that information is stored in B1:B50, with the headers in row 1.

    My temporary fix is to nest 27 IF statements within eachother, which works, but obviously I don't like my formulas to appear like they were written by a 5 year old, also if season_pd_header happens to get bigger, it makes for a hell of a mess.

    In anycase, here is my nested IFs, hopefully it at least helps to illustrate what I am trying to do.

    Please Login or Register  to view this content.
    Thank you in advance!!!
    Last edited by JamesBlack90; 03-22-2015 at 08:40 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: I think I need to use Index?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Registered User
    Join Date
    03-22-2015
    Location
    Australia
    MS-Off Ver
    Office 2011
    Posts
    3

    Re: How to countif a specific column based on a cell text value.

    Sorry zbor. Is it ok now?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: How to countif a specific column based on a cell text value.

    Yes, it's fine.

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: How to countif a specific column based on a cell text value.

    If you post a workbook it will be soo much easier to help you.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: How to countif a specific column based on a cell text value.

    Since you don't provide a sample workbook the results are just guesswork.


    If the rounds in the top row go from 1 to 27 then you can try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If not then try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-22-2015
    Location
    Australia
    MS-Off Ver
    Office 2011
    Posts
    3

    Re: How to countif a specific column based on a cell text value.

    Thank you heaps Jacc!

    The second way works perfectly and I was able to replace Tipping!$B$2:$AB$50 with season_pd to allow for future expansion

    Thanks again.

  8. #8
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: How to countif a specific column based on a cell text value.


    '''''''''

+ 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. [SOLVED] Converting Hlookup to Index Match with variable column index number
    By SimonLock in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-09-2015, 09:14 AM
  2. Index match offset to get subsequent index values in a column
    By Andrew_Step in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2013, 02:55 PM
  3. Replies: 4
    Last Post: 12-27-2012, 06:18 PM
  4. [SOLVED] VBA for creating Index-Match every 2 rows where INDEX refer to a different column per row
    By bisaya789 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 03:46 AM
  5. Replies: 5
    Last Post: 04-18-2010, 11:06 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