#### congthanh6868

##### New member

- Joined
- May 28, 2014

- Messages
- 4

- Reaction score
- 0

- Points
- 0

Hello everyone,

I use below formula Countif, sum, or, and. I look for a VBA to get lighter file. Because the file in fact will be filled up to 40,000 rows.

OR

=IF(F$1="","",IF(OR(COUNTIF(F$1:F$27,$A30)>0,COUNTIF(F$1:F$27,$B30)>0,COUNTIF(F$1:F$27,$C30)>0,COUNTIF(F$1:F$27,$D30)>0),SUM(COUNTIF(F$1:F$27,$A30),COUNTIF(F$1:F$27,$B30),COUNTIF(F$1:F$27,$C30),COUNTIF(F$1:F$27,$D30)>0),0))

AND

=IF(S$1="","",IF(AND(COUNTIF(S$1:S$27,$N30)>0,COUNTIF(S$1:S$27,$O30)>0,COUNTIF(S$1:S$27,$P30)>0,COUNTIF(S$1:S$27,$Q30)>0),1,0))

Please anyone can help me.

Thank you so much.

Thanh

I use below formula Countif, sum, or, and. I look for a VBA to get lighter file. Because the file in fact will be filled up to 40,000 rows.

OR

=IF(F$1="","",IF(OR(COUNTIF(F$1:F$27,$A30)>0,COUNTIF(F$1:F$27,$B30)>0,COUNTIF(F$1:F$27,$C30)>0,COUNTIF(F$1:F$27,$D30)>0),SUM(COUNTIF(F$1:F$27,$A30),COUNTIF(F$1:F$27,$B30),COUNTIF(F$1:F$27,$C30),COUNTIF(F$1:F$27,$D30)>0),0))

AND

=IF(S$1="","",IF(AND(COUNTIF(S$1:S$27,$N30)>0,COUNTIF(S$1:S$27,$O30)>0,COUNTIF(S$1:S$27,$P30)>0,COUNTIF(S$1:S$27,$Q30)>0),1,0))

Please anyone can help me.

Thank you so much.

Thanh