+ Reply to Thread
Results 1 to 7 of 7

Need code to populate results based on certain criteria

  1. #1
    Registered User
    Join Date
    01-24-2019
    Location
    Topeka
    MS-Off Ver
    2016 Professional Plus
    Posts
    18

    Need code to populate results based on certain criteria

    I don't know if this is the correct forum, whether this can be achieved simply by formulas or not, but I figured here was a good place to start.

    I'll provide a template.

    This is what I'm looking to accomplish:

    This is a spreadsheet that shows which clients are or are not coming to an event that we are putting on. There are a variety of tabs, each for a designated person to keep track of their client contacts and the status of whether or not they were invited, not invited, confirmed that they're coming, or confirmed that they are not coming.

    What I'm having issues with is determining a way to show on the first "summary" tab the list of all clients who have confirmed. The idea is for anyone to be able to open up the file and look at the summary tab and be able to see exactly who is attending the event.

    Any help is appreciated!!

    Anthony
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Need code to populate results based on certain criteria

    Hiya, I think something like this may work for you (see attachment)
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Need code to populate results based on certain criteria

    +The code--

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-24-2019
    Location
    Topeka
    MS-Off Ver
    2016 Professional Plus
    Posts
    18

    Re: Need code to populate results based on certain criteria

    Poizhan,

    Thanks so much for putting this together. It's perfect.

    I do have a question, though. How could I incorporate into the code something that dictates only clients that are labeled "Confirmed Yes" populate on the summary tab? As it currently is coded, anyone simply listed in the tables populates on the summary tab.

    I'll add data validation so that the RMs can only choose between a few notations.

    Thanks again!

    Anthony

  5. #5
    Registered User
    Join Date
    01-24-2019
    Location
    Topeka
    MS-Off Ver
    2016 Professional Plus
    Posts
    18

    Re: Need code to populate results based on certain criteria

    Also, Poizhan, any time I make any changes to the code, I keep getting an error stating: "Run-time error '1004': Application-defined or objected-defined error" with this portion highlighted: " If ws1.Cells(nRow, "B").Value = ws.Name Then." Is this code unable to be edited?

  6. #6
    Registered User
    Join Date
    01-24-2019
    Location
    Topeka
    MS-Off Ver
    2016 Professional Plus
    Posts
    18

    Re: Need code to populate results based on certain criteria

    Poizhan - Additionally, any time I make any subtle change, such as changing RM to the actual person's name, the whole thing just stops working. I see in the code it's "If ws.Name Like "*RM*" Then", so I would put, for example, RM - Person's Name, and the macro just stops working.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,584

    Re: Need code to populate results based on certain criteria

    Would you consider doing this using a pivot table?
    In the copy of the file the PQ sheet shows a linked table (updatable) produced by appending the tables on the RM1 and RM2 sheets using Get & Transform (AKA Power Query).
    The PT sheet shows a pivot table based on the PQ sheet. The slicer may be used to display the client details based on status.
    Note that a new column B is inserted on the RM1 and RM2 sheets but as it turns out it is probably not needed.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Compare 2 work sheet cells and populate based on results
    By marimuthuravi in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-02-2018, 06:52 AM
  2. Populate cells based on 3 criteria.
    By danallamas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2015, 09:24 AM
  3. [SOLVED] VBA code to populate a cell based on 2 criteria
    By dave84x in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-12-2014, 01:59 PM
  4. Using VBA to populate cells based on a criteria in another tab
    By mongoose36 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-07-2013, 02:12 PM
  5. [SOLVED] Populate Cell based on two criteria
    By her.rockstar in forum Excel General
    Replies: 5
    Last Post: 08-02-2013, 02:14 PM
  6. Populate Based on Criteria
    By Kumara_faith in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-12-2013, 02:37 AM
  7. Populate Value Based On Criteria
    By Kumara_faith in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-09-2008, 10:31 AM

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