+ Reply to Thread
Results 1 to 8 of 8

Counting different cells in one formula

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    833

    Counting different cells in one formula

    Hi guys,

    I am trying to use this countif function:

    =COUNTIF('Sheet1'!I2:I39, "On hold")

    I want to know how I can count various cells in the same formula?

    i.e.

    Sheet 1, 'on hold' crtieria count cells: I2:I39 and I41:I43

    Thank you
    Thanks,

    R.



  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Counting different cells in one formula

    =COUNTIF('Sheet1'!I2:I39, "On hold")+COUNTIF('Sheet1'!I41:I43, "On hold")

  3. #3
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    833

    Re: Counting different cells in one formula

    Bingo, thank you!

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Counting different cells in one formula

    Hi rayted,

    A sample workbook would allow us to give a better answer but two possible answers are...

    =Countif(first range) + CountIf(second range)

    or

    Try using the CountIfs() function.
    https://www.techonthenet.com/excel/f...s/countifs.php
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    833

    Re: Counting different cells in one formula

    thanks MarvinP.

    davsth provided the response prior and both your and their response has helped. thank you!

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

    Re: Counting different cells in one formula

    Try this

    =SUMPRODUCT(COUNTIF(Sheet1!I2:I39,I41:I43))
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Counting different cells in one formula

    Hi rayted,

    If you have a good answer for your problem, you should mark it as solved, so others don't need to try and give an answer.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    833

    Re: Counting different cells in one formula

    Sorry - marked as solved now!

+ 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. Counting cells with text and ignoring cells with formula
    By Mad Moose in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-31-2015, 04:50 AM
  2. Ignore blank cells in formula counting number of different cells.
    By deneh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-07-2015, 08:52 AM
  3. [SOLVED] formula for counting colored cells
    By vijay1505 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-15-2013, 05:43 AM
  4. [SOLVED] Not counting cells with a formula
    By pickslides in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2013, 10:54 PM
  5. Count # of Cells, w/o counting formula cells
    By brotherwo in forum Excel General
    Replies: 3
    Last Post: 10-21-2010, 08:00 PM
  6. Formula for counting cells next to another cell
    By JCool in forum Excel General
    Replies: 1
    Last Post: 04-07-2009, 12:48 PM
  7. [SOLVED] Counting cells with formula CF (not value CF)
    By jc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-22-2005, 04:25 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