문제

Trying to identify the syntax to do this in Excel 2010:

Look for the string "Potomac" in a range of rows. Wherever "Potomac" is found, count the whole numbers in the B and C column of that row. Search all rows in the same manner and sum the result.

I know that a long COUNTIF or COUNTIFS could do this but I have not been able to identify the syntax.

도움이 되었습니까?

해결책

Assuming your data extends to 5 rows from row 1, try this single-cell formula:

{=SUM(IF(A1:A5="Potomac", B1:B5 + C1:C5, 0))}

This is an array formula, meaning you don't actually type the braces, but use Ctrl + Shift + Return once you've done editing.

(I'm at home without Excel so am doing this from memory. If it doesn't work it means I've slipped the syntax. Do let me know.)

다른 팁

Try this, values in A1:A5

=COUNTIFS(A1:A5;"Potomac";B1:B5;"<>0")+COUNTIFS(A1:A5;"Potomac";C1:C5;"<>0")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top