+ Reply to Thread
Results 1 to 5 of 5

How to get the number of specific value of a cell based on the value of another cell

  1. #1
    Registered User
    Join Date
    01-06-2018
    Location
    alex
    MS-Off Ver
    Microsoft Excel 2019 MSO (Version 2301 Build 16.0.16026.20196) 32-bit
    Posts
    45

    Question How to get the number of specific value of a cell based on the value of another cell

    Hello all,

    I need to get the number of all column F that is having 2 or more different values in column B?

    for example...

    MR2 is having one item in column b, so that counts as one, and i need to finde the count all other MRs that only have one value same as MR2

    same apply to other MR1, which is having 2 values, and the same for it. need someway to get the count of all the MRs that have only 2 values.

    Hope you got my point!

    Is that possible to obtain from excel?

    Thanks for your help
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,573

    Re: How to get the number of specific value of a cell based on the value of another cell

    Please manually add your expected results to your sample file to show us what you want.
    Ali


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

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-06-2018
    Location
    alex
    MS-Off Ver
    Microsoft Excel 2019 MSO (Version 2301 Build 16.0.16026.20196) 32-bit
    Posts
    45

    Re: How to get the number of specific value of a cell based on the value of another cell

    This is what i need in the added column,
    i've done it manually, but the list i have is over 6000 line.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,231

    Re: How to get the number of specific value of a cell based on the value of another cell

    One way, using this array formula:

    =SUM(IF(($F$2:$F$83=F2),1/COUNTIFS($B$2:$B$83,$B$2:$B$83,$F$2:$F$83,F2)))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,231

    Re: How to get the number of specific value of a cell based on the value of another cell

    or a non-array alternative...

    =SUM(INDEX(($F$2:$F$83=F2)/COUNTIFS($F$2:$F$83,$F$2:$F$83&"",$B$2:$B$83,$B$2:$B$83&""),0))

+ 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] If a cell contains specific text then another cell brings specific number
    By Hloni in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 11-01-2017, 06:25 AM
  2. [SOLVED] Remove duplicate from rows from specific cell/row number to specific cell/row number
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2016, 10:38 PM
  3. Specific number of cell to fill with color based in a dynamic cell range
    By Blue_Wings in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-01-2015, 09:46 AM
  4. Specific number of cell to fill with color based in a dynamic cell range
    By Blue_Wings in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2015, 10:10 AM
  5. Replies: 2
    Last Post: 09-26-2014, 09:01 PM
  6. Print specific pdf page based on number in cell
    By cbdu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 05:18 PM
  7. Replies: 3
    Last Post: 01-21-2009, 05:37 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