![]() |
Count fuction
Hi,
I am trying to find a formula that will be best for the below situation i am having. Lets say I have a data as below, I want to know how I can find the count of B for Q1B01. All the blanks I can't delet, so basically my table is set up as below. A B Q1B01 H10F001 Q1B01 H10F002 Q1B01 Q1B01 H10F003 Q1B01 H10F004 Q1B01 Q1B01 H10F005 Q1B01 Q1B01 H10F006 Q1B01 Q1B02 0905036 Q1B02 0905037 Q1B03 P005750 Q1B03 P005751 Q1B03 P005752 Q1B04 0906278 Q1B04 0906279 Q1B04 0906280 Q1B04 0906281 Q1B05 H10F007 Q1B05 H10F008 Q1B05 H10F009 Q1B05 H10F010 Q1B05 H10F011 Q1B05 H10F012 Q1B05 H10F013 Q1B05 H10F014 Q1B05 H10F015 Q1B05 Q1B05 H10F016 Q1B05 Q1B05 H10F017 Q1B05 H10F018 |
Count fuction
Hi Helen
You can use COUNTIF(). With Q1B01 in C1; try formula in D1 as show below; Col A Col B Col C Col D Q1B01 H10F001 Q1B01 =COUNTIF(A:A,C1) Q1B01 H10F002 Q1B02 =COUNTIF(A:A,C2) Q1B01 Q1B01 H10F003 Q1B01 H10F004 Q1B01 Q1B01 H10F005 Q1B01 Q1B01 H10F006 Q1B01 Q1B02 905036 If this post helps click Yes --------------- Jacob Skaria "Helen" wrote: Hi, I am trying to find a formula that will be best for the below situation i am having. Lets say I have a data as below, I want to know how I can find the count of B for Q1B01. All the blanks I can't delet, so basically my table is set up as below. A B Q1B01 H10F001 Q1B01 H10F002 Q1B01 Q1B01 H10F003 Q1B01 H10F004 Q1B01 Q1B01 H10F005 Q1B01 Q1B01 H10F006 Q1B01 Q1B02 0905036 Q1B02 0905037 Q1B03 P005750 Q1B03 P005751 Q1B03 P005752 Q1B04 0906278 Q1B04 0906279 Q1B04 0906280 Q1B04 0906281 Q1B05 H10F007 Q1B05 H10F008 Q1B05 H10F009 Q1B05 H10F010 Q1B05 H10F011 Q1B05 H10F012 Q1B05 H10F013 Q1B05 H10F014 Q1B05 H10F015 Q1B05 Q1B05 H10F016 Q1B05 Q1B05 H10F017 Q1B05 H10F018 |
Count fuction
Try this:
=SUMPRODUCT((A1:A100="Q1B01")*(B1:B100<"")) Adjust the ranges to suit your data. Hope this helps. Pete On Aug 12, 9:05*am, Helen wrote: Hi, I am trying to find a formula that will be best for the below situation i am having. Lets say I have a data as below, I want to know how I *can find the count of B for Q1B01. All the blanks I can't delet, so basically my table is set up as below. A * * * B Q1B01 * H10F001 Q1B01 * H10F002 Q1B01 * Q1B01 * H10F003 Q1B01 * H10F004 Q1B01 * Q1B01 * H10F005 Q1B01 * Q1B01 * H10F006 Q1B01 * Q1B02 * 0905036 Q1B02 * 0905037 Q1B03 * P005750 Q1B03 * P005751 Q1B03 * P005752 Q1B04 * 0906278 Q1B04 * 0906279 Q1B04 * 0906280 Q1B04 * 0906281 Q1B05 * H10F007 Q1B05 * H10F008 Q1B05 * H10F009 Q1B05 * H10F010 Q1B05 * H10F011 Q1B05 * H10F012 Q1B05 * H10F013 Q1B05 * H10F014 Q1B05 * H10F015 Q1B05 * Q1B05 * H10F016 Q1B05 * Q1B05 * H10F017 Q1B05 * H10F018 |
Count fuction
To avoid blank entries try the below...in D1
Col C Col D Q1B01 =SUMPRODUCT(--($A$1:$A$100=C2),--($B$1:$B$100<"")) Q1B02 =SUMPRODUCT(--($A$1:$A$100=C3),--($B$1:$B$100<"")) If this post helps click Yes --------------- Jacob Skaria "Jacob Skaria" wrote: Hi Helen You can use COUNTIF(). With Q1B01 in C1; try formula in D1 as show below; Col A Col B Col C Col D Q1B01 H10F001 Q1B01 =COUNTIF(A:A,C1) Q1B01 H10F002 Q1B02 =COUNTIF(A:A,C2) Q1B01 Q1B01 H10F003 Q1B01 H10F004 Q1B01 Q1B01 H10F005 Q1B01 Q1B01 H10F006 Q1B01 Q1B02 905036 If this post helps click Yes --------------- Jacob Skaria "Helen" wrote: Hi, I am trying to find a formula that will be best for the below situation i am having. Lets say I have a data as below, I want to know how I can find the count of B for Q1B01. All the blanks I can't delet, so basically my table is set up as below. A B Q1B01 H10F001 Q1B01 H10F002 Q1B01 Q1B01 H10F003 Q1B01 H10F004 Q1B01 Q1B01 H10F005 Q1B01 Q1B01 H10F006 Q1B01 Q1B02 0905036 Q1B02 0905037 Q1B03 P005750 Q1B03 P005751 Q1B03 P005752 Q1B04 0906278 Q1B04 0906279 Q1B04 0906280 Q1B04 0906281 Q1B05 H10F007 Q1B05 H10F008 Q1B05 H10F009 Q1B05 H10F010 Q1B05 H10F011 Q1B05 H10F012 Q1B05 H10F013 Q1B05 H10F014 Q1B05 H10F015 Q1B05 Q1B05 H10F016 Q1B05 Q1B05 H10F017 Q1B05 H10F018 |
All times are GMT +1. The time now is 12:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com