8 Replies Latest reply on Oct 23, 2013 1:23 PM by . Indumon

# Count where Field 2 is "A" or "B" - Super Easy

Hello,

Im trying to count the number of items in Column A where Column B is equal to "stringA" or "stringB"

How do I do this?

• ###### 1. Re: Count where Field 2 is "A" or "B" - Super Easy

Hi Taylor,

Please try Sum(If ColumnA=Columnb then 1 else 0 end)

• ###### 2. Re: Re: Count where Field 2 is "A" or "B" - Super Easy

Hi Indumon,

I think I didnt explain it clearly see below:

 Column A Column B Property 1 AAA Property 2 AAA Property 3 BBB Property 4 DDD Property 5 DDD Property 6 DDD Property 7 AAA

I'm a trying to come up with the formula that will count the number of AAA and BBB, so in this case the number would be 4.

Basically my goal is to Group AAA & BBB count them, and divide them by the total number of properties= 4/7 = 57%

• ###### 3. Re: Count where Field 2 is "A" or "B" - Super Easy

Ok. I think I understood now.

Sum(If(CoumbB='AAA' or ColumnB='BBB' then 1 else 0 End))/Count(CoumnB)

Sample workbook attached.

1 of 1 people found this helpful
• ###### 4. Re: Count where Field 2 is "A" or "B" - Super Easy

Hey,

I can't download at the moment but I used your sample equation and for some reason im getting the expected closing parenthesis after string 7 ... any ideas?

Sum(If([Deal Stage]="Closed" or [Deal Stage]="On Boarded" then 1 else 0 end))/Count([Property Name])

• ###### 5. Re: Count where Field 2 is "A" or "B" - Super Easy

Sum(If [Deal Stage]='Closed' or [Deal Stage]='On Boarded' then 1 else 0 end)/Count([Property Name])

• ###### 6. Re: Count where Field 2 is "A" or "B" - Super Easy

Trying getting rid of the parenthesis before [Deal Stage] and after end.  Looking at Indumon's workbook, he took those parenthesis out (Sum(If [Column B]='AAA' or [Column B]='BBB' then 1 else 0 end)/Count([Column B])).

1 of 1 people found this helpful
• ###### 7. Re: Count where Field 2 is "A" or "B" - Super Easy

Thanks so much Indumon, that was it!

• ###### 8. Re: Count where Field 2 is "A" or "B" - Super Easy

thanks Caitlin!