ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   CountIf 2 columns (https://www.excelbanter.com/excel-discussion-misc-queries/262427-countif-2-columns.html)

Phippsy

CountIf 2 columns
 
Hi

I need a formula to count cells in one column containing dates depending on
the contents of a differnt column like SumIf has the option

Eduardo

CountIf 2 columns
 
hi
=COUNTIF(A2:A5,"South")



"Phippsy" wrote:

Hi

I need a formula to count cells in one column containing dates depending on
the contents of a differnt column like SumIf has the option


Jacob Skaria

CountIf 2 columns
 
If you are looking to count the dates which falls on a certain month..try the
below formula which count the number of dates in ColA which falls in the same
month as the date specified in cell B1.

=SUMPRODUCT(--(TEXT(A1:A100,"mmyyyy")=TEXT(B1,"mmyyyy")))

If this is not what you are looking for please elaborate with an example..

--
Jacob (MVP - Excel)


"Phippsy" wrote:

Hi

I need a formula to count cells in one column containing dates depending on
the contents of a differnt column like SumIf has the option


Jacob Skaria

CountIf 2 columns
 
You can add more conditions as below....

ColA date = same month as in cell B1 and ColC = cell D1

=SUMPRODUCT((TEXT(A1:A100,"mmyyyy")=TEXT(B1,"mmyyy y"))*
(C1:C100=D1))

--
Jacob (MVP - Excel)


"Jacob Skaria" wrote:

If you are looking to count the dates which falls on a certain month..try the
below formula which count the number of dates in ColA which falls in the same
month as the date specified in cell B1.

=SUMPRODUCT(--(TEXT(A1:A100,"mmyyyy")=TEXT(B1,"mmyyyy")))

If this is not what you are looking for please elaborate with an example..

--
Jacob (MVP - Excel)


"Phippsy" wrote:

Hi

I need a formula to count cells in one column containing dates depending on
the contents of a differnt column like SumIf has the option



All times are GMT +1. The time now is 07:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com