+ Reply to Thread
Results 1 to 12 of 12

Using Index/Match produces duplicate entries

  1. #1
    Registered User
    Join Date
    02-19-2014
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Using Index/Match produces duplicate entries

    I have a workbook with many spreadsheets, each sheet representing data for a group of equipment types. Data is entered onto the "Main Page" including a sample code that links the entry to one of the spreadsheets. The data from Main Page is captured by the linked group spreadsheet and listed in order in which it is entered (same row at it appears on Main Page). The data consists of the date and the colony count. Once the data is captured onto the spreadsheet, it is sorted by earliest date to most recent date. The corresponding colony count is listed in the column beside the sorted date.
    Problem: If multiple entries are made on the same date but refer to different colony counts and different items within the same equipment group, the sorted data lists the first entry multiple times for all entries on that date.I have created a very edited version of this workbook containing 40 rows and manipulated data to have as many duplicates as possible to highlight the problem.
    Attached Files Attached Files

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

    Re: Using Index/Match produces duplicate entries

    Try the following formulas:
    In F11 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In G11 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In H11 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    02-19-2014
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Using Index/Match produces duplicate entries

    I tried the formulas as you suggested but got blank cells as a result. See attached. I looked up the function Aggregate in Excel Help and it was not listed. I have Excel 2007.
    I even tried the array step with CTRL+Shift+Enter. Either way resulted in blank cells.

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

    Re: Using Index/Match produces duplicate entries

    My apologies, I failed to notice the '2007' in your profile.
    The following array entered formulas* may be used instead:
    For F11 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For G11 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For H11 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    If you would like us to demonstrate the formulas on the '11L to 80L Tanks' sheet, please upload a copy of the workbook that does not have protected worksheets.
    Let us know if you have any questions.

  5. #5
    Registered User
    Join Date
    02-19-2014
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Using Index/Match produces duplicate entries

    Exactly what I wanted. See your results. I played around with entries on Main Page and the data was captured exactly as it should. I will probably spend the rest of the month trying to understand the syntax and how each function contributes to the result.

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

    Re: Using Index/Match produces duplicate entries

    Glad that works the way you want/need. One good way to see what the formulas are doing is to select a cell that contains the formula, perhaps F26 as it will show how the blanks cells in column C are filtered, and run Evaluate Formula which is found on the Formulas tab in version 2010, I imagine it is somewhere similar in the 2007 version.
    If you are satisfied with the end result, please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

  7. #7
    Registered User
    Join Date
    02-19-2014
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Using Index/Match produces duplicate entries

    One aspect of each spreadsheet that I neglected to include in the example is that 2-years of data are included on the same spreadsheet. The first set of columns is data from last year (in this case 2016). This set of data is used to establish alert and action levels using mean and std. dev. There is a second set of columns that represent the current year. Here when data is entered on the Main Page for the current year the alert/action levels are constantly being recalculated upon each entry. The results at the end of the year provide values for the next year and the cycle repeats. The date is changed from , for example, 2016 to 2017, and 2017 is changed to 2018.
    The formulas you provided do not differentiate the sample date. So I have 2 sets of the same data. I have a phrase from the old sheet that selected the data based upon the date in the top of the column, but I do not know how to insert it, if at all.
    Here is the phrase: (IF(YEAR('Main Page'!B$3:B$5000)=$I$3,B$11:B$5000),C11. Remember the cell references are from the actual workbook, but the principle is the same. Look at the example I sent on cell H16. That would replace I3 in the formula I printed.
    I could use your expertise to resolve this issue as I am still a bit unfamiliar with the syntax and do not know how to edit it without a complete disaster.
    As a reference the original Main Page has approximately 2000 rows and many more columns that provide us with information not pertinent to this issue.
    C11 represents E11
    B3:B5000 represent the sample date
    I3 represents the year

    Thank you

    Vince Tentarelli

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

    Re: Using Index/Match produces duplicate entries

    If I understand correctly the year checking capability could be included with the formula that populates column B of the 11L to 80L Tanks sheet.
    The formula for cell B11 could be written as follows:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The formula first checks to make sure that the year in row three of the main page matches the year in cell H3 and if not leaves the cell blank. I also notice that the formula for column C goes through all of the same checks as column B which seems unnecessary. It would seem that the formula for C11 could be written:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Likewise D11 could be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If I have misunderstood then I would suggest uploading a small (only include as many items on the main page as would be needed to demonstrate possible exclusions along with a couple of nonconsecutive inclusions) sample file and manually input the outputs you expect to see on the 11L to 80L Tanks sheet.
    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    02-19-2014
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Using Index/Match produces duplicate entries

    I added your formulas to the cells you recommended and the distinction for the year did indeed work. In order to make it work, however, I had to add 2 new columns for the 2017 side of the spreadsheet. I was able to remove the column with the consecutive numbers and had the 2017 data rely on the 2016 column of consecutive numbers. However, I noticed a bit of a glitch. Notice columns F & P, the sorted dates. There are dates out of order. In column P 3/2/2017 appears after 4/18/2017 & 4/20/2017. There are several examples of this sorting error. I am wondering if I did something wrong, but it must handle the possibility of entering the data out of order. That is the purpose of the Sorted Data columns.
    Because this is a table, we might be able to sort the data, but some columns are not part of the data, and cell references may become corrupt. Your thoughts?
    I have some questions just for my own clarification. In Column C the function ISNUMBER appears in the formula for the date. Why ISNUMBER?
    What is the purpose of subtracting 10 after the ROW function? Is it to return to Row 1?

    I am still amazed how quickly you responded and how elegant your solutions are. I would probably have several nested IF statements that would take up an entire page.

    Vince Tentarelli

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

    Re: Using Index/Match produces duplicate entries

    As to sorting the dates, I feel that the easiest solution is to select one of the cells in the existing table, and from the table tools design tab choose to expand the table on the main page from its present B2:D74 range to B2:G94. Then sort column A from oldest to newest again.
    As to the use of isnumber specifically in column C I am not sure it is needed now that the condition of the corresponding cell in column B needing to have a value has been added. There may, however, be cases where the all of the conditions attached to filling column B are met yet there is not a match between the source (main page column F) and the codes (L22:L45) .
    If this is a more general inquiry as to what isnumber does I would suggest selecting cell B17 and running the Evaluate Formula feature from the Formulas tab. You'll see that the match produces a number so isnumber returns a result of true for the first part of the AND inside the IF. Now do the same thing with cell B18 where match produces an error and isnumber passes that to IF as FALSE.
    The minus 10 simply resets the rows of the row function from an array of {11;12;…100} to an array of {1;2;…90} so that the small function will pass along the correct ordinal to the index(C11:C100). A good way to see how this works is to remove the minus 10 from the formula in cell F11 and activate using Ctrl + Shift + Enter (remember to undo the change afterwards).
    I hope that makes some sense.
    Let us know if you have any questions.

  11. #11
    Registered User
    Join Date
    02-19-2014
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Using Index/Match produces duplicate entries

    That seems the easiest and most versatile solution. That way we can sort by any category on the main page and get an instant view of any trends without complicated formulas.
    Thank you for your help.

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

    Re: Using Index/Match produces duplicate entries

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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] Handling Duplicate Entries with Index/Match/Large in Column Data
    By TwiceBorn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-12-2016, 02:11 PM
  2. Index/Match to Match entries on multiple criteria
    By manning457 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 02:32 PM
  3. [SOLVED] How to adjust Index to catch duplicate entries?
    By jgomez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2013, 10:29 AM
  4. If contains formula with index match formula produces errors
    By Nicole Matthews in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-31-2013, 07:39 PM
  5. [SOLVED] Index and Match duplicate entries
    By pauldaddyadams in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2013, 07:04 AM
  6. Preventing duplicate entries and sorting by alphabetical using Index feature
    By Potsdamerplatz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-17-2012, 03:40 PM
  7. Need to remove duplicate entries from an index
    By Lacaycer in forum Excel General
    Replies: 10
    Last Post: 04-04-2012, 10:50 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