+ Reply to Thread
Results 1 to 12 of 12

Count range of cells if not next to each other

  1. #1
    Registered User
    Join Date
    09-19-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Count range of cells if not next to each other

    Hello all,

    I am completely stuck with a formula in Excel 210 right now!

    I'll give you a bit of background of what I am trying to do. I need to count the number of cells that are equal to '1' within ranges C175 & C177:C190 & C200:C280.

    I have tried the formula below, however it doesn't work as the ranges are not together.

    =COUNTIF('IDS BFR''s'!C175,'IDS BFR''s'!C177:C190,'IDS BFR''s'!C200:C280,"1")

    Can anyone provide any assistance or provide a function that would work in this case?

    Thanks very much


  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Count range of cells if not next to each other

    is your "1" a real number. what is in cell 176,191 to 199 ?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    09-19-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Count range of cells if not next to each other

    Quote Originally Posted by vlady View Post
    is your "1" a real number. what is in cell 176,191 to 199 ?
    Hi vlady,

    Within the ranges in my formula the "1" can be either 1 2 or 3. But I only want it to count the cells that are = to 1.

    The other ranges as you specified are for a different component and are not to be included in this count.

    Hope you can help.

    Thanks

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Count range of cells if not next to each other

    then you get get the sum of those range since they are all 1 right!

    you can try it like this
    =SUMIF(A1:A12,1,A1:A12)

    or this would also work

    =SUMIF(A1:A12,1)

    Edit: same with the countif
    Last edited by vlady; 09-19-2013 at 11:24 PM.

  5. #5
    Registered User
    Join Date
    09-19-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Count range of cells if not next to each other

    Hi,

    Its not actually the 'SUM' I am after. I need it to indicate how many cells have a 1 in it. I need to do the same for 2 & 3.

    The range it needs to check is as follows:

    C175 & C177:C190 & C200:C280.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Count range of cells if not next to each other

    you can do that with the countif since it's just in the same column C

    =countif(C175:c280,1) as long as c176,c191 to c199 will not have any number from 1 to 3

    =countif(C175:c280,2)
    =countif(C175:c280,3)

  7. #7
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Count range of cells if not next to each other

    Please try this logic.
    Attached Files Attached Files
    Please click 'Add reputation', if my answer helped you.

  8. #8
    Registered User
    Join Date
    09-19-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Count range of cells if not next to each other

    Quote Originally Posted by vlady View Post
    you can do that with the countif since it's just in the same column C

    =countif(C175:c280,1) as long as c176,c191 to c199 will not have any number from 1 to 3

    =countif(C175:c280,2)
    =countif(C175:c280,3)
    Hi Vlady,

    Unfortunately c176,c191 to c199 do also have numbers from 1-3 and these cannot be counted for this equation.

    I really need the to 'ranges' to be specific

  9. #9
    Registered User
    Join Date
    09-19-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Count range of cells if not next to each other

    Hi Ramananhrm,

    That could work however, the range is split as indicated above so its not one complete range. Its actually 3 sections of a column.

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Count range of cells if not next to each other

    that's why i asked what are in those ranges in post #2

    you can use

    =sum(countif for first range),countif(secondrange),countif(3rd range))

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: Count range of cells if not next to each other

    Try this
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    09-19-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Count range of cells if not next to each other

    Quote Originally Posted by vlady View Post
    that's why i asked what are in those ranges in post #2

    you can use

    =sum(countif for first range),countif(secondrange),countif(3rd range))
    Sorry Vlady I must'nt have explained myself well

    However, the formula works perfect :D

    I really appreciate it.

    Thanks!!

+ 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. Count a Range of cells if another range of cells meets criteria
    By mjg060468 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-21-2013, 02:57 PM
  2. [SOLVED] Count in a range, where identical adjacent cells count as one instance.
    By the-algebraist in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-05-2013, 11:18 AM
  3. Replies: 6
    Last Post: 11-11-2012, 12:40 AM
  4. [SOLVED] Count a range of cells if another range meets criteria
    By LadySetsuka in forum Excel General
    Replies: 8
    Last Post: 04-14-2012, 10:09 AM
  5. [SOLVED] Count cells in one range based on parameters in another range
    By dave roth in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-29-2005, 03:06 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