+ Reply to Thread
Results 1 to 6 of 6

automatically adjusting formulas on filtering

  1. #1
    Registered User
    Join Date
    04-09-2007
    Posts
    13

    automatically adjusting formulas on filtering

    Hi,

    I have a spreadsheet with the following column headings:

    Date, Quarter, Type of Facility, Address, State, Region, 1.1, 1.2, 1.3,...1.10, 2.1........9.8.

    Each of the numbered columns (1.1, 1.2 etc) correspond to a particular issue. These numbered columns are filled with "YES", "NO" or "NA" (not applicable) for the corresponding location. I have simple counting formulas that sum the number of No's, Yes's and NA's for each column, and also a formula that calculates percentages. These calculations are displayed at the bottom of the workshhet below all of the data

    Ideally I would like to filter the spreadsheet so that I can analyse the data by any combination of Quarter (1Q, 2Q, 3Q or 4Q), Type of Facility, or Region (East, West, North, or South).

    However, when I apply a filter, although the data is filtered the way I want it to be, the formulas that sum the columns do not automatically adjust to calculate totals for just the filtered data. Is there a way to have these formuals automatically adjust after filtering?

    Mark

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try something like:

    Please Login or Register  to view this content.
    where A1:A3 or the items you want to count based on B1:B3 equalling "Yes"...

    adjust ranges to suit.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-09-2007
    Posts
    13

    automatically adjusting formulas on filtering

    Quote Originally Posted by NBVC
    Try something like:

    Please Login or Register  to view this content.
    where A1:A3 or the items you want to count based on B1:B3 equalling "Yes"...

    adjust ranges to suit.
    My skill in excel is pretty basic, and so are the formulas I work with. I don't fully understand what you mean by "where A1:A3 or the items you want to count based on B1:B3 equalling "Yes"

    For example, in my spreadsheet, I am summing column J, rows 8 - 111 so my formula is =COUNTIF(J8:J111,"yes"). How would I do this using the code you suggested?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Just replace all ranges in my formula with your range: $J$8:$J$111

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-09-2007
    Posts
    13
    Thanks. And what is the "1" and "3" for in your formula?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by markwilest
    Thanks. And what is the "1" and "3" for in your formula?
    The 3 is the function number argument for the Subtotal Function. If you look at Subtotal help in Excel files, you'll see the 3 means Count, 9 would be Sum, etc...

    the 1 defines the Height argument in the Offset() function...it just tells the offset the height (in number of rows) to offset references by...

    You can review Excel Help files for details on each function....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1