ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   lookup text in one column, count in another column (https://www.excelbanter.com/excel-worksheet-functions/154777-lookup-text-one-column-count-another-column.html)

dmshurley

lookup text in one column, count in another column
 
I want to look up "DSC" in column BH, then I want to count different values
in column AC, but I only want to count the occurences of value in column AC,
if "DSC" occurs in column BH.

I tried =if(vlookup(bh8:bh550,"dsc),(countif(AC8:AC650,"X" ))

I've tried everything at this point.

If BH8:BH550 is "DSC", then count AC8:AC550,"X"

There are different values in both columns and I need a formula to perform
this function based on the "DSC" and "X" criteria, which may change to
something like "KLK" and "S".

HELP!!!

Elkar

lookup text in one column, count in another column
 
Try using SUMPRODUCT:

=SUMPRODUCT(--(BH8:BH550="DSC"),--(AC8:AC550="X"))

You could also replace "DSC" and "X" with cell references, like:

=SUMPRODUCT(--(BH8:BH550=A1),--(AC8:AC550=B1))

Then type in the values you wish to match in cells A1 and B1

HTH,
Elkar


"dmshurley" wrote:

I want to look up "DSC" in column BH, then I want to count different values
in column AC, but I only want to count the occurences of value in column AC,
if "DSC" occurs in column BH.

I tried =if(vlookup(bh8:bh550,"dsc),(countif(AC8:AC650,"X" ))

I've tried everything at this point.

If BH8:BH550 is "DSC", then count AC8:AC550,"X"

There are different values in both columns and I need a formula to perform
this function based on the "DSC" and "X" criteria, which may change to
something like "KLK" and "S".

HELP!!!



All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com