Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    Philadelphia, PA
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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. #2
    Star Lounger
    Join Date
    Dec 2009
    Location
    Mexico City, D.F., Mexico
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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"))
    This eco-post is made of recycled electrons

  3. #3
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Stephane Quenson View Post
    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.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

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