+ Reply to Thread
Results 1 to 18 of 18

search for missing matches

  1. #1
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    search for missing matches

    I looked through the forms a lot for an answer but couldn’t really find anything.

    I have an array of information (I have attached a sample to help with the explanation) with a set total included in it. I then pull all of this information onto another worksheet using the index and match formulas that NBVC was so kind to help me out with.

    My problem is that I need the total form the column on sheet 2 to tie out to the total in the array on sheet 1. I know that I am missing 12 entries of positive numbers I just can’t think of a way to figure out which numbers.

    I was looking for a way to test which combinations of row 2 (X) and column A (Y) exist on sheet 1 as (x,y) but do not exist on sheet 2 in a combination pair (x,y) in column A and column B.

    I did my best to explain it, I can try and make it clearer but I’m hoping that the example helps out. As a side note; the formulas didn’t all copy to the new sample book I created but there is an index and match formulas creating the numbers in the total column on sheet 2 as well as formulas generating the information in the array from other sheets.



    Sample1.xlsx

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    Where do you want to see the results?

    Perhaps you can re-attach the workbook showing some sample results as you want to see them (and explain why those are the results you expect).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    I used the countif formula to determine there are 32 negative and 722 posative numbers in the array that give me my total 11,877... I then tried to bring all of the numbers that combine into that onto sheet 2.

    I would expect H1415 to be the same number. It isn't and I was able to determine that there are 12 less poitive numbers in Sheet 2 column C than there are on the array on Sheet 1. I am just looking to see if there is a way, other than manually looking into it, to produce a list of missing x,y combinaitons (or possible just cell locations) that appear on Sheet 1 array but are not present on the Sheet 2 list since sheet 2 column A and B should be the same as Row 2 and Colum A from sheet 1 (They aren't or I wouldn't have this problem).

    As of yet I dont have any working solutions so I can't post expected reults because I have never run into or attempted to solve a problem like this is excel.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    Sorry, I am struggling to understand this. I just need you to do some manual calculations and put them where the result should go in the workbook.. then tell me what manual calculations you did.

  5. #5
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    I started working through them all. I added the ones I figured out using a rather lenghty workaround but a work around non-the-less.

    It is important for me to determine that everything is included becuase I need the overall values to tie out. Basically I am not interested in the total unless it is the same as the total form sheet 1.
    I hope this clarifies my question.


    Sample1.xlsx

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    I think that would be quite a complex formula or it would need VBA

    How about using Conditional Formatting to colour the cells in Sheet1 that don't match in Sheet2?

    See attached.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    Yea, that would work great, jsut needed a way to identify discrepencies between both lists. How did you accomplish the highlighting I dont see any formulas

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    while in the sheet1 range, go to Home|Conditional Formatting and then Manage Rules.

    Select the Rule and click Edit to the see the formula.

  9. #9
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    Wow, thanks for all your help!

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    From PM:

    Quote Originally Posted by smls
    You helped me a little while back to create conditoinal formatting to weed out missing numbers between 2 sheets. I thought I understood what you were doing at the time but I wanted to try and do it again and am unable to recreate it I was hoping you could just simply explain what each part of the conditional formatting was doing so I could try and make it work. I didn't post it to the forums as the problem was already answered, I am just looking to understand it better so I don't keep runnign into the same issue.

    Thanks
    The formula was:

    =AND(B3>0,COUNTIFS(INDEX(DATA,0,1),B$2,INDEX(DATA,0,2),$A3)=0)

    So first I created a named range, DATA, which is Sheet2!A2:B1414. This is because when you use Conditional Formatting and want to reference data in another sheet, you need to use a named range (or indirect reference). It won't allow us to simply use: Sheet2!A2:B1414.

    So the conditional check now is to check 2 conditions.. and both have to be TRUE... so we use AND() to combine the conditions.

    The first condition is easy.. check that the current cell is greater than 0 first.

    Note that when you create conditional formatting for multiple cells, the formula you enter is based on the top-left most cell you have selected, and based on the absolute/relative referencing you use, the formulas automatically get applied respectively to each cell you selected to apply formatting to... So we selected from B3 on, so B3 is the relative cell we reference here for checking >0 condition.

    The second conditions is a COUNTIFS() which in itself is checking multiple conditions (2 in this case). So we are checking that the first column in the DATA range is the value in row 2 of the same column the cell to format is in... and we are also checking that the second column in the DATA range is equal to the value in column A of the same row the cell to format is in.

    Then INDEX() function used here, is a way to get us to be able to segregate the columns in the DATA range, since we want to compare one column to one value and the other column to another value... INDEX(DATA,0,1) means check first column in DATA range. The syntax for INDEX() is INDEX(array,row_num,column_num) so the array is DATA, the row_num is 0 (when we use 0, it forces INDEX to indicate all rows), column_number is 1.

    Hope this helps.

  11. #11
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    I am having trouble recreating it within a workbook. I have attached a copy of the leadsheet, this holds the numbers I wanted ot check against, and a copy of month 1, eventually there will be 12.
    The idea is to drop a system generated sheet each month onto the corresponding month page. The month pages feed the leadsheetes and hte graphs/charts. The lead sheet then totals whatever column heading I insert into C1. The idea was to have a quick eyesight check, I was hoping to get the condiotnal formatting to highlight all the numbers on Month1! to make sure all of the appropriate numbers were pulled over, in case any accounts were missing on the leadsheet.



    highlight unused numbers problem.xlsx

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    So is the conditional formatting applied to the Leadsheet or the Month sheet? I am confused. Can you give examples of exactly which cells should be highlighted and why?

  13. #13
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    I think part of the confusion is coming from the way I have it set up, that is my fault. I am making this to be put into use July 1, as such I used a singles months printout and pasted it into all 12 months worth of worksheets. This is producing the same data in each month of the lead sheet. In actuality all months should have zeros or differnt numbers on the leadsheet due to each month inherintly having different productivity levels.

    I am trying to get the Month1! sheet to highlight all of the numbers that do not appear on the Leadsheet which should be all numbers not in the Coumn marked actual YTD as well as any numbers in Actual YTD that do not shot up on Leadsheet, either due to the account number missing of through my own faulty formula.

    Does that make any more sense?

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    Let's test this...

    Select C1 in Leadsheet and name it InputColumn.

    Select A1:AA15 and name it DATA

    Then select C2:G14 in Month1! sheet.. and apply conditional formatting with formula: =AND(C2>0,C$1=InputColumn,ISNA(INDEX(DATA,MATCH($A2,INDEX(DATA,0,1),0),3)<>C2))

    does this do what you expected? The red 3 is the column number in DATA that corresponds to month of interest.

  15. #15
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    I renamed and inserted the fomulas like you posted but I didn't get anything that came up highlighted?and did you mean G15 or K15? Col K is hte last Col in the data set not G, thats the only reason I ask, wasn't sure if there was a formula reason for this or not?

  16. #16
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    Meant to attach it last post, sorry. highlight unused numbers problem.xlsx

  17. #17
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: search for missing matches

    This is what I have...

  18. #18
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: search for missing matches

    O, I misunderstood part of your last post, I just renamed the actual cell, I didn't create the reference name, now it works perfectly, thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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