+ Reply to Thread
Results 1 to 5 of 5

Count value in one cell based on values in another cell

  1. #1
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    55

    Count value in one cell based on values in another cell

    Hi guys, here's my question.

    How can I count cells in Column B, if Column A2:a594 equals "X". The count function does not allow me to do this, the formula I'd like is count(b2:594 if(a2:594=G4)). The formula is count the range in column b, if the range in column A equals cell G4.

    Any help? Its all text, so no will the sum feature work?

    Thanks

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,030

    Re: Count value in one cell based on values in another cell

    Use COUNTIFS:

    =COUNTIFS($B$2:$B$594,"<>",$B$2:$B$594,G4)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365 Win 11 Home 64 Bit
    Posts
    21,249

    Re: Count value in one cell based on values in another cell

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan


    Have you debugged your code?
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    55

    Re: Count value in one cell based on values in another cell

    Hi guys, thanks! Normally I would attach a sample workbook, but it was a fairly straightforward Q and Ali's response worked perfect. Thanks for being so quick!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,030

    Re: Count value in one cell based on values in another cell

    You're welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. 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. [SOLVED] Count unique values based on another cell value
    By terratushi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-05-2018, 08:53 AM
  2. Replies: 2
    Last Post: 05-25-2016, 12:46 PM
  3. count values based on cell colour
    By vijayaragavan in forum Excel General
    Replies: 1
    Last Post: 05-06-2015, 09:05 AM
  4. Count unique values based on value in another cell in same row
    By danbak in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2013, 03:54 AM
  5. count Unqiue values based on a cell value
    By paul.butler in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2012, 11:34 AM
  6. [SOLVED] How to count cell values based on 2 conditions
    By ciw916 in forum Excel General
    Replies: 3
    Last Post: 11-20-2012, 05:58 PM
  7. Count cell values based on text colour
    By mundo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2008, 09:25 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