Sumproduct and wildcard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The data in my sheet is like:

Column A Column B
1 4602546wx
0 4615648dp
1 455586wd
1 465565ab

and it is a huge data

I want to count all the '1's where they have column B starting with 46.

Any help on how can I ahieve this by using wildcard would be greatly
appreciated.

KD.
 
=SUMPRODUCT(--(A1:A1000="1"),--(LEFT(B1:B1000,2)="46"))

If 1s are numbers (not TEXT) then:

=SUMPRODUCT(--(A1:A1000=1),--(LEFT(B1:B1000,2)="46"))
 
No need to test for 1 if it is just 1 and 0

=SUMPRODUCT(--(LEFT(B1:B1000,2)="46"),A1:A1000)

a tad more efficient

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top