+ Reply to Thread
Results 1 to 4 of 4

COUNTIF with a twist ;)

  1. #1
    Registered User
    Join Date
    05-07-2021
    Location
    Naples, Italy
    MS-Off Ver
    Office 2016
    Posts
    30

    COUNTIF with a twist ;)

    Hello everyone!

    I hope you are well. I am trying to work out a formula but I just can't get my head around this.

    Basically, I have a table to list people seated around an actual table and I have to work out the number of people around the table. In column C the user will either put the family name (e.g. "Browns", as in the attached example) or the name of the person (e.g. "John Smith", as in the attached example). Now the user will have to specify how many family members will be seated at the table in column H (e.g. 5, as in the attached example) but there is no need to specify John Smith is only one person.

    The formula I am trying to build in H15 is:
    IF C5 and H5 are not blank THEN increase the count in H15 by the amount in H5
    ELSEIF C5 is not blank and H5 is blank THEN increase the count in H15 by 1
    Does anyone have come across to something similar?

    Many thanks,
    Dani
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,417

    Re: COUNTIF with a twist ;)

    One way
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-07-2021
    Location
    Naples, Italy
    MS-Off Ver
    Office 2016
    Posts
    30

    Re: COUNTIF with a twist ;)

    Awesome!

    I have slightly modified as follow

    Please Login or Register  to view this content.
    so if there is a number but not a family name it will not increment by that amount

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,417

    Re: COUNTIF with a twist ;)

    You're welcome.


    You are entitled to amend the formula to your heart's content. Whatever works for you. I just worked with the parameters you outlined.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Reverse IRR with a twist!!!!!!
    By $J$L$G in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2017, 12:24 AM
  2. [SOLVED] Help with COUNTIF formula with a twist
    By 509IAhECkh7y in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2016, 09:46 PM
  3. Min If with a Twist
    By david0985 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2014, 06:21 PM
  4. #div/0! with a twist
    By Bjordion in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-11-2011, 03:53 PM
  5. Setting a max value with a twist
    By wodo5 in forum Excel General
    Replies: 1
    Last Post: 03-03-2010, 10:42 AM
  6. Sum with a twist
    By ace4andy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-26-2008, 03:08 AM
  7. Sumif with a twist?
    By Bruce in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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