Excel Formula using IF and Countif to count number of matching Text in a column

Jyotirmaya

Board Regular
Joined
Dec 2, 2015
Messages
205
Office Version
  1. 2019
Platform
  1. Windows
=IF(F:F="29.04.2021",COUNTIF(E3:E1000,"ok"))
=IF(F:F="30.04.2021",COUNTIF(D3:D1000,"Afternoon"))

I am using this formula, if column F:F there is text "29.04.2021" then against that row if there are any "ok" in column E:E1000 then it will count the number of "ok" in the designated cell, but sometimes it shows the value and sometimes it shows FALSE, Kindly help me to know what should be change in the code ? or any different code required for the result

Book1
ABCDEFGHI
1Sl.No.NameMobileNo.Morning/AfternoonStatusDATE
2FALSEFALSE
3Morningok29.04.2021
4Afternoonok29.04.2021
5AfternoonNot ok30.04.2021
6AfternoonOk30.04.2021
7
Sheet1
Cell Formulas
RangeFormula
H2H2=IF(F:F="29.04.2021",COUNTIF(E3:E1000,"ok"))
I2I2=IF(F:F="30.04.2021",COUNTIF(D3:D1000,"Afternoon"))
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Something like this?
Book1
ABCDEFGHI
1Sl.No.NameMobileNo.Morning/AfternoonStatusDATE
222
3Morningok29.04.2021
4Afternoonok29.04.2021
5AfternoonNot ok30.04.2021
6AfternoonOk30.04.2021
Sheet1
Cell Formulas
RangeFormula
H2H2=COUNTIFS(F3:F1000,F3,E3:E1000,E3)
I2I2=COUNTIFS(F3:F1000,F5,D3:D1000,D4)


Oppa, I should have type in the date, OK and Afternoon, but you know how to alter the formula
 
Upvote 0
Book1
HI
222
Sheet1
Cell Formulas
RangeFormula
H2H2=COUNTIFS(F3:F1000,"29.04.2021",E3:E1000,"ok")
I2I2=COUNTIFS(F3:F1000,"30.04.2021",D3:D1000,"Afternoon")
 
Upvote 0
Solution

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top