Consulting

Results 1 to 7 of 7

Thread: Help!!

  1. #1
    VBAX Newbie
    Joined
    Mar 2019
    Posts
    3
    Location

    Help!!

    On the attached sheet I need to find a way to populate to separate tables based on a condition in the main body of the sheet. For example if a=yes populate the data into yes table if a=no populate data into no table. Does anyone know how to make this happenExample.xlsxExample.xlsx

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    1. Welcome to the forum - take a minute and read the information in the links in my signature

    2. "Help" as a title is not as good as a more descriptive title, such as "How do I count cells based on criteria?"

    3. Providing test data and required results usually generates better answers since potential responders have something to start with without having to use time and effort to make some up, which may not be correct.

    4. There's no definitive definition of what you want in "Total ..." so I'm assuming that you want the count of 'yes' and the count of 'no'

    I'd use the COUNTIF() function

    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
    VBAX Newbie
    Joined
    Mar 2019
    Posts
    3
    Location
    My apologies for not being clear, essentially it is going to be a sales tracker where cells B-J are sales figures and the yes/no is a condition upon which table the figures feed into, i.e. which area of the business the sales have come from

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Quote Originally Posted by Jayharry View Post
    My apologies for not being clear, essentially it is going to be a sales tracker where cells B-J are sales figures and the yes/no is a condition upon which table the figures feed into, i.e. which area of the business the sales have come from
    And was my guess at what you wanted correct?

    If not, then attaching a workbook with sample data and desired results will go a long way towards your getting a satisfactory response
    ---------------------------------------------------------------------------------------------------------------------

    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

  5. #5
    VBAX Newbie
    Joined
    Mar 2019
    Posts
    3
    Location
    Quote Originally Posted by Paul_Hossler View Post
    And was my guess at what you wanted correct?

    If not, then attaching a workbook with sample data and desired results will go a long way towards your getting a satisfactory response

    Not quite but thank you very much for replying, I have attached an expected outcome if that helpsExample.xlsx

  6. #6
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Afraid it doesn't help much

    Capture.JPG
    ---------------------------------------------------------------------------------------------------------------------

    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

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Guessing again that you wanted the Total of A for 'yes' and for 'no', you can use the SUMIF() function

    I switched the col B and col C to make it easier for me. Seems more logical that way anyway

    If you want it your original way, it can be switched back


    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

Posting Permissions

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