+ Reply to Thread
Results 1 to 9 of 9

Populate records depending on entry in another sheet

  1. #1
    Registered User
    Join Date
    03-25-2020
    Location
    Tauranga New Zealand
    MS-Off Ver
    MS 2013
    Posts
    4

    Populate records depending on entry in another sheet

    Hi there, hopefully you can assist me. I have a 4 sheet spreadsheet that I have set up for inspections of organisations that I hope can all link together to generate a report to provide to the customer on sheet 4.
    I have a series of questions on sheet 2 that require answering and 3 columns within this sheet that are labelled yes, no, na. Upon answering the question one of these columns has a 1 applied to it as applicable. Comments are also made on the sheet with the evidence as text that was verified or not as the questions are answered.
    The formula that I am trying to understand and create will be something like, if there is a 1 in this cell then use the text from this other cell to populate the report on sheet 4. The report will then only list the areas that need correcting as recorded in the sheet 2 checklist.
    Does that make sense?
    Hope you can understand what I am trying to achieve. If not happy to explain more.
    Thanks very much
    David
    Last edited by Pepe Le Mokko; 03-26-2020 at 03:34 AM. Reason: Title

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: If function

    David, it sounds like you have the workbook mocked up, perhaps you can upload a sample (following the instructions in the yellow banner at the top) with some examples and desired results and we can help you with the appropriate formulas.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    03-25-2020
    Location
    Tauranga New Zealand
    MS-Off Ver
    MS 2013
    Posts
    4

    Re: If function

    Hi Sambo kid

    Thanks for the speedy reply. I have attached a sample document with some cells highlighted to try and explain better. Sheet 2 is the checklist that I have created. As you can see I have highlighted some cells.

    The concept is to have the text highlighted in green populate the report tab as highlighted, so as going through the checklist a simple 1 is entered and the text as green cell and then it automatically populates the site report and can be saved as a PDF and it becomes a report for the customer. The same applies to the other highlighted cells and corresponding cells in the report tab.

    I have followed the instructions for attaching the document so hopefully it will come through now as well.

    Thanks again for your help.

    DC
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: If function

    Please see the attached.
    I used Array formulas to get this solution (meaning the formulas must be entered using Shift+Ctrl+Enter instead of just enter.
    In B15, I entered this formula:
    =IFERROR(INDEX(Checklist!A:A,SMALL(IF(Checklist!F:F=1,ROW(Checklist!F:F)-ROW(INDEX(Checklist!F:F,1,1))+1),ROW()-14)),"")
    Once you enter the above formula with Shift+Ctrl+Enter, you should see brackets {} around the formula
    Cells C15 and D15 are:
    =IFERROR(INDEX(Checklist!B:B,SMALL(IF(Checklist!F:F=1,ROW(Checklist!F:F)-ROW(INDEX(Checklist!F:F,1,1))+1),ROW()-14)),"")
    =IFERROR(INDEX(Checklist!H:H,SMALL(IF(Checklist!F:F=1,ROW(Checklist!F:F)-ROW(INDEX(Checklist!F:F,1,1))+1),ROW()-14)),"")

    You can then copy these formulas down as far as you need.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-25-2020
    Location
    Tauranga New Zealand
    MS-Off Ver
    MS 2013
    Posts
    4

    Re: If function

    Hi Gregb11

    That is wonderful what you have done. Far more sophisticated that I could ever conceive. How on earth did you work that out. Very impressive.

    If I add these formulas to the final checklist and report in the same format will they pull the information from the same cells even thought here will bemany times more cells in the columns? Be good to understand the formula a bit in case I need to amend or adjust some time.

    Thanks very much for your help with this it is much appreciated.

    Kind regards

    David

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: Populate records depending on entry in another sheet

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    As you are new I did it for you this time

  7. #7
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: Populate records depending on entry in another sheet

    I'm not sure I understand what you are asking, but, the formulas will work no matter how much data you have on the sheet "Checklist". HOWEVER, you will need to copy the formula down far enough (since I wrote the formulas to display nothing if there is nothing to display, you can copy down the formula much farther than you think you would need).

    One thing to keep in mind that on the Report Sheet, if you change where you have the first row of data (row 15 in your file), the formulas will have to change slightly. At the end of each formula there is this:
    ROW()-14)

    The number 14 represents the row PREVIOUS to your data, so if you were to insert a row above that (so say you data now starts in row 16, you would change the number 14 to 15 in those 3 formulas).

  8. #8
    Registered User
    Join Date
    03-25-2020
    Location
    Tauranga New Zealand
    MS-Off Ver
    MS 2013
    Posts
    4

    Re: Populate records depending on entry in another sheet

    Hi Greg11

    I have written the formulas into the cells and it doesn't seem to be pulling the text through for all of the cells. I thought it would pull all the text through for each row within F column that had a 1 inserted as it does not seem to be pulling all the text through. Maybe I have set something up wrong. Would you mind having a look at the attached spreadsheet again and see if you can get it to work properly. This is still only a trial so when I get the final checklist etc sorted I will set it up the same as this spreadsheet and hoping I can then just use the formulas the same.

  9. #9
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: Populate records depending on entry in another sheet

    A couple of things:
    1. For the formula in column D, you were missing an exclamation point - the correct one is here (with the exclamation point that was missing in RED
    =IFERROR(INDEX(Checklist!H:H,SMALL(IF(Checklist!F:F=1,ROW(Checklist!F:F)-ROW(INDEX(Checklist!F:F,1,1))+1),ROW()-14)),"")
    2. You need to copy the formulas down as far as needed (for as many rows that have a 1 in column F (Like I said, you can copy the formula down farther than that because I wrote it such that it will show nothing if there is no data to show.
    I have attached the file.
    Let me know if you have any other questions.

+ 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. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  2. Replies: 2
    Last Post: 04-23-2017, 12:04 AM
  3. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  4. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  5. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  6. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 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