How to use trim finction in array

U

ub

Hi I have using array formula
=COUNT(IF(('sheet1'!$C$4:$C$200="corporate")*('sheet1'!$L$4:$L$200="ip"),'sheet1'!$Q$4:$Q$200))
I want to trim all extra spaces in column c.
Please advise how to use trim function.
Thanks
 
T

Toppers

=COUNT(IF((TRIM(Sheet1!$C$4:$C$200)="corporate")*(Sheet1!$L$4:$L$200="ip"),Sheet1!$Q$4:$Q$200))
 
T

Teethless mama

=SUMPRODUCT(ISNUMBER(SEARCH("corporate",'sheet1'!$C$4:$C$200))*('sheet1'!$L$4:$L$200="ip"))
 
J

JE McGimpsey

Probably need to add a term to count only numbers in column Q:

=SUMPRODUCT(--ISNUMBER(SEARCH("corporate",Sheet1!$C$4:$C$200)),
--(Sheet1!$L$4:$L$200="ip"), --ISNUMBER(Sheet1!$Q$4:$Q$200))
 
Top