Consulting

Results 1 to 4 of 4

Thread: Filtered List - loop through only counting "visible" rows based on Criteria

  1. #1

    Filtered List - loop through only counting "visible" rows based on Criteria

    If all,,
    hoping for some help....

    Scenario:

    One spreadsheet that has columns A:Z with filter a on O (Filter = "Orange")
    Columns C,D,E also contain various "states" will go with Yes,NO,Maybe,Never
    Column F also has various "states" will go with Okay,Sort,Leave,Move,Mix
    The last data row would be row 1024 (this is a fixed row)

    Once the filer has been applied to O ("Orange") then what I am looking to achieve is the following:

    If C,D,E to Row 1024 = NO AND F = Okay count all of these and in Cell D1040 out the total
    If C,D,E to Row 1024 = NO AND F = Sort count all of these and in Cell D1041 out the total
    If C,D,E to Row 1024 = NO AND F = Leave count all of these and in Cell D1042 out the total
    If C,D,E to Row 1024 = NO AND F = Move count all of these and in Cell D1043 out the total
    If C,D,E to Row 1024 = NO AND F = Mix count all of these and in Cell D1044 out the total

    Any help would be greatly appreciated

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,715
    Location
    I'd use the COUNTIFS() WS formula

    Small sample of data, and the results are not where you wanted them but you can adjust

    Capture.JPG
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    Banned VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,648
    =sumproduct((C1:C1024&D1:D1024&E1:E1024&F1:F1024&O1:O1024="NONONOOkayOrange ")*1)
    =sumproduct((C1:C1024&D1:D1024&E1:E1024&F1:F1024&O1:O1024="NONONOSortOrange ")*1)
    =sumproduct((C1:C1024&D1:D1024&E1:E1024&F1:F1024&O1:O1024="NONONOLeave")*1)
    =sumproduct((C1:C1024&D1:D1024&E1:E1024&F1:F1024&O1:O1024="NONONOMoveOrange ")*1)
    =sumproduct((C1:C1024&D1:D1024&E1:E1024&F1:F1024&O1:O1024="NONONOMixOrange" )*1)

  4. #4
    Thanks a lot guys - headache has been resolved.....

Posting Permissions

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