SOLVED
Home

Excel- SUM function not working with =IF(COUNTIFS function

James09
New Contributor

Hi I am trying to find the Sum of a column that has given me the output of either 0 or 1 using the formula =IF(COUNTIFS(B22:W22,"np")*1,"1","0")- I have attached the Excel spreadsheet

 

Many Thanks

 

James

3 Replies

@James09 , use numbers, not texts

=IF(COUNTIFS(B4:W4,"np"),1,0)
Solution

@James09 , or, as variant

=--(COUNTIFS(B4:W4,"np")>0)

double dash converts logical to number

 

@Sergei Baklan 

Fantastic,

Thank you Very Much I had no idea

 

James

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies