Home > Software engineering >  How can I write an excel formula to count the number of times values in two separate columns are the
How can I write an excel formula to count the number of times values in two separate columns are the

Time:03-04

I have two separate columns in an excel spreadsheet calculating gambling profits

when a free bet is placed, the total payout column and the total won column will be the same

i want to write an excel formula that will count how many times these two columns have the same value within the same row

I was able to use COUNTIF and COUNTIFS formulas for everything else I was trying to accomplish, but I can not figure this one out

thank you

CodePudding user response:

Using SUMPRODUCT and the double unary --:

=SUMPRODUCT(--(B2:B5=D2:D5))

enter image description here

  • Related