+ Reply to Thread
Results 1 to 9 of 9

How to autopopulate if cell says "yes"

  1. #1
    Registered User
    Join Date
    04-02-2018
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365 Business
    Posts
    8

    How to autopopulate if cell says "yes"

    Hi everyone!
    I'm working on automating a program we're managing in an excel workbook and need this process to be as simple as possible for the user. Essentially, I have one sheet that has several columns, including one yes/no column. If the column in sheet one says "yes" I'd like all the other info from the columns to be pulled over to the next sheet and fill in that info in the next available row. I have included a sample spreadsheet.
    I'm aware you can filter for yes or no and then copy this to the next sheet, but I would like this to be an automated process.
    There will be instances where certain contacts will have skipped the first sheet and just be entered in the second, so the automation needs to account for that as well.
    Thank you so much!! Any advice is much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to autopopulate if cell says "yes"

    I converted both data ranges into tables. Tables have many advantages: they know how big they are, they copy down formulas and formatting automatically and they are easy to reference in formulas.

    Here is more information on tables: http://www.utteraccess.com/wiki/Tables_in_Excel.

    I added data validation to column H so only Yes or No is an acceptable answer. You may consider adding data validation to column B so that it only accepts dates, Column E (a whole number greater than or equal to zero) and column F (a decimal between 0.0 and 1.0). Copy down the validation or formulas to the column the first time and it will remember them ever after. When you add a new row, the formulas, etc. copy down automatically.

    Here is more information on data validation: http://www.utteraccess.com/wiki/Data_Validation

    Other than that, when you answer yes in the last column, that row is copied to the Relationship sheet and deleted from the Outreach sheet. Once it is done, it's done. I could put in an "Are you sure?" message box if you desire.

    The relationship sheet is also a table, you have options for formulas and data validation here as well.

    I noticed one thing. You have a notes column way out in column Q. Is that the same notes as on the outreach sheet? If so, I need to modify my code a bit.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    04-02-2018
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365 Business
    Posts
    8

    Re: How to autopopulate if cell says "yes"

    Hi dflak!
    Thank you SO much!!
    A few questions/responses:
    1. I definitely want anyone in the outreach sheet, whether they answer yes or no, to remain in the outreach sheet. I just would like the ones answered yes to also copy to the relationship sheet.
    2. Yes the notes should also be copied over from the first sheet - I put it at the end in column Q in the next sheet because that would likely be the area with the most text and I don't want the other info to be way further out on the sheet because the notes section is taking up so much space.
    3. Looking at the sheet you attached, it looks like several of the "influencers" were copied over to the relationship section multiple times, was that just for testing? And when I tested it myself, and typed in yes, it pulled them over to the next sheet, but I have no ability to press the back button and bring them to the outreach sheet again, is that the way it is coded and is there any simple way around that in case the user makes a mistake?
    4. Lastly, is there a way to make the information dynamic, so if you change the reach number for example in the relationship sheet, it would also update in the outreach sheet?


    THANK you SO SO much!! I really appreciate it.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to autopopulate if cell says "yes"

    The duplicate records in the relations sheet are a result of testing.

    I can copy over the notes.

    As for recalling - I can do at least one thing: when the user clicks yes, I can bring up a dialog box with a message that says, "You are about to move this record. Do you want to do this?" To actually recall a record after it has been moved: I can definitely do this for the very last record entered because I know where it is.

    As for other records, I would need to know what makes a record unique. Is it the combination of Influencer and date of outreach? What I could do is provide a recall button, This will bring up a form where the user can enter an influencer (and maybe a date range) and it will being up a lost of records. The user selects the one wanted and it will be moved back. This will take a fair bit of "fun" coding.

    I am waiting for some data to download in the real world which is why I have time to respond now. When that completes I will be busy, but should have enough spare time to be able to complete this by Friday.

    Let me know your thoughts on how you would like the recall to work.

  5. #5
    Registered User
    Join Date
    04-02-2018
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365 Business
    Posts
    8

    Re: How to autopopulate if cell says "yes"

    got it!
    If the notes need to be in the same column in both sheets I'd prefer that to manually copying the notes over, I'd really like this process to be as automated as possible.
    Can you explain what you mean by recall?

    In the Outreach sheet, a single influencer will only ever be in that sheet once, so my apologies if I had the same name multiple times in that sheet. So it would not have to be a combination, just the name of the influencer.
    For example, "ketogirl."
    Is there a way to keep the record from being moved at all and just having the info copied?
    I'd like to have a comprehensive list of each person we reached out to and in the case that they agree to work with us, they move to the next sheet, where we gather more information on them. Some people in the second sheet we've had ongoing relationships with, so they would skip over that first sheet completely.

    In both sheets, the influencer would only be in there once, but there will be cases in which an influencer is both in outreach and relationship if they respond yes (ideally.) Does that make sense?

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to autopopulate if cell says "yes"

    I'll put the notes in the correct column. That's not an issue.

    I'll keep the record on the first sheet and only copy it to the next sheet.

    Now that I know that the influencer is unique, I can use that as a key. So if someone makes a mistake and changes the Yes back to a no, I will remove the record from the second sheet.

    I think I have enough to go on. You'll have a prototype soon.

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to autopopulate if cell says "yes"

    Here is the prototype. It has sample data in it. You can remove the sample data (make sure you keep the headings). The program makes use of Excel Tables. If you are interested, here is more information on tables: http://www.utteraccess.com/wiki/Tables_in_Excel. All you have to know about tables is that they know how big they are and remember formulas, formats and validations. So even if you remove all the information, it's still there. Also as you add data in the row immediately below the table, it becomes part of the table and it inherits the formulas, formats, etc.

    Column A is free format. Type in any name you want.

    Column B has data validation on it to make sure what is entered is a valid date, and later than January 1, 2018. If you need to go back further let me know.

    Column C has data validation for Campaigns. It is run from a table on the Lookups Sheet. This sheet can be hidden after you set it up. Clear out the test data and replace it with real data. This is a table, so as you add data, it becomes part of the table and part of the drop-down values. You can sort the values in the table if you want.

    Column D has data validation for Consumer Segment - manage it the same way as Campaigns.

    Column E has data validation for a whole number greater than or equal to zero

    Column F has data validation to limit it to 0% to 100%

    Column G is free entry.

    Column J has data validation to Yes or No. Yes will add the record to the Relationship table. No will remove it if it is already there.

    Hidden hint: If you change the data for a row, you can make that change show up by going to Column J and re-selecting YES. You can also do the same thing by selecting NO, making the changes and selecting YES again.

    The display to the right of the table is a slicer. It acts like a filter on the table. So if you want to see who has already agreed to terms, select Yes (This should mimic what is on the Relationship Sheet). If you want to see who has not agreed to terms select No. If there are blank cells, it will show as an option too. You can make multiple selections with the CTRL Key and clear the filters by clicking on the funnel icon.

    Believe it or not, most of this is "standard" Excel. I did very little programming.
    Attached Files Attached Files
    Last edited by dflak; 04-04-2018 at 04:32 PM.

  8. #8
    Registered User
    Join Date
    04-02-2018
    Location
    Vermont, USA
    MS-Off Ver
    Microsoft Office 365 Business
    Posts
    8

    Re: How to autopopulate if cell says "yes"

    This is amazing!! Thank you so much. is there an easy way for me to change column c to free format, we will likely have many different sources/campaigns so I think it would be easier to just be able to type in whatever and then sort, but let me know if you have other reasoning for doing this otherwise. (the same for consumer segment)
    For column b it would be great if it's formatted for a valid date still, but any date (not specifically past January 1, 2018.)
    Also out of curiosity, what do you get out of doing this, it's so kind! Is it just a hobby or does the forum compensate you? You don't have to answer that just curious!

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to autopopulate if cell says "yes"

    I made the changes. B is any valid date after New Year's Day 1900 (that's as far back as Excel goes ).

    Columns C and D are free-form.

    The main reason I do this on the forum is to "pay back" all those who have helped me through the years. Also it helps me get some practice. I plan to "retire" in about a year, and go on to contracting which I might have to do remotely, so working with "customers" now gets me thinking about what kinds of questions I should be asking to nail down the requirements.

    The two main reasons I took on this issue were:
    1. You included a sample workbook - many people don't and they wonder why their questions don't get answers.
    2. To me, the solution was obvious and there was a lot of "low hanging fruit" such as tables, data validation and slicers that are "standard" Excel and easy to implement. I knew I could give you a lot with little work. Now you have some examples for future work in Excel.

    Sometimes I take on cases because they interest me either as a brain teaser or I know they will force me to look up some obscure corner of Excel that I hadn't worked in before.
    Attached Files Attached Files

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. Replies: 4
    Last Post: 06-11-2017, 02:03 PM
  3. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  4. If "6343" in cell A3 matches "monthly" in B3 show a "Y" in C3
    By laaxy in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-05-2014, 07:38 PM
  5. [SOLVED] VBA help needed to remove all "/" then replace with "-" from cell "B3"and "B5"
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 02:11 PM
  6. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  7. [SOLVED] Macro to pull info. from two workbooks to autopopulate a "tag"
    By traceylreed in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2012, 01:00 PM

Tags for this Thread

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