Count if D:cells only if G:cell contains a constant value

2k05gt

Board Regular
Joined
Sep 1, 2006
Messages
151
trouble trying to do this calculation.

=COUNTIF(D2:D2135,"DC")if (g2:G2135="incoming")

in otherwords count d:2 through d:2135 only if G2 through G2134 is equal to incoming.

any suggestions?????
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

2k05gt

Board Regular
Joined
Sep 1, 2006
Messages
151
Wow, Quick....
Sweet... Works fantastic

What do you see wrong with this?

=SUMPRODUCT(--(B2:B2135,"161.80.*.*"),--(G2:G2135="outgoing"))
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Are you using the *s as wildcards?

Perhaps

=SUMPRODUCT(--(LEFT(B2:B2135,7)="161.80."),--(G2:G2135="outgoing"))
 

2k05gt

Board Regular
Joined
Sep 1, 2006
Messages
151

ADVERTISEMENT

Are you using the *s as wildcards?

Perhaps

=SUMPRODUCT(--(LEFT(B2:B2135,7)="161.80."),--(G2:G2135="outgoing"))

Yes, Wild cards, it's an ip address but I only care about the first two octets
 

2k05gt

Board Regular
Joined
Sep 1, 2006
Messages
151
...then that last formula should work for you.....I hope

Barry, What are you doing up so late?

anyway, those calcs work but not getting the results I expected.
Thanks for your help,
 

Forum statistics

Threads
1,137,300
Messages
5,680,701
Members
419,928
Latest member
dolincasting

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top