# Thread: IF statement to find cells with subtotals?

1. Here's what's happening:

Position HR power?
------------ ---- ---------------
catcher 6 no power
catcher 7 no power
catcher Total 13 power
first base 1 no power
first base 26 power
first base Total 27 power

In column B, we used the subtotal function to find the sum of homeruns by position. And in column C, we wrote an IF function to test the number of homeruns to determine if the position has power or not. More than 10 HRs = power, 10 or less = no power. (And then we used the fill handle to pull the IF function all the way down.)

Here's the question: nested into this IF function, I guess, can Excel determine which cells are the subtotals? For example, we want "power" to appear next to catcher Total and first base Total. All other cells in column C should be blank.

2. I am not sure that in Excel you can test the content of a formula with a formula. But in your case, if you only want information when the column A contains the word "Total", then you can use a formula using the FIND() function:
=IF(ISERR(FIND("Total",A11)),"",IF(B11>10,"Power", "No Power"))

3. Originally Posted by Stephane Quenson
I am not sure that in Excel you can test the content of a formula with a formula.
Oh, but you can - to my delight Rory pointed me to this solution.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•