From: njcr83 on 1 Jun 2010 10:48 Hi, I am having an issue with comparing columns of values. Basically I have a table similar to the below except with a couple of thousand lines. Either the first column will have a value that doesn't match with the second column or vice versa so basically I need Excel (2002) to begin at the top and compare the values until it finds a mismatch, extract that value (perhaps to another sheet) and continue down the columns doing the same thing until the end. 46,898,748.00 46,898,800.00 2,365,412.00 2,365,412.00 15,465.00 15,465.00 4,864.00 4,864.00 41,564.00 54,156.00 48,642.00 41,564.00 1,564,968.00 48,642.00 4,589,846.00 1,564,968.00 5,852,852.00 4,589,846.00 6,458,456.00 5,852,852.00 At the moment I manually do this so, using the above example, I would go down the list until the amount of 54,156.00 which I would cut and paste into a different sheet and then delete the cell with that value so the rest of the values on the right move up and match until the final amount on the left of 6,458,456.00 which would also be removed as it also doesn't have a match. With a couple of thousand items this is very timeconsuming. I'm not sure if a vlookup would help or perhaps a macro but any help would be greatly appreciated. Many thanks in advance Niall
From: Don Guillett on 1 Jun 2010 10:59 One way. copy col b to the end of col a>delete col b>sort col a>use a macro from the bottom up sub nodups() dim i as long for i=cells(rows.count,1).end(xlup).row to 2 step 1 if cells(i1,1)=cells(i,1) the rows(i).delete next i end sub  Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "njcr83" <njcr83(a)discussions.microsoft.com> wrote in message news:24786481A7D04B0CA0279165E7E3F34A(a)microsoft.com... > Hi, > > I am having an issue with comparing columns of values. > > Basically I have a table similar to the below except with a couple of > thousand lines. > Either the first column will have a value that doesn't match with the > second > column or vice versa so basically I need Excel (2002) to begin at the top > and > compare the values until it finds a mismatch, extract that value (perhaps > to > another sheet) and continue down the columns doing the same thing until > the > end. > > 46,898,748.00 46,898,800.00 > 2,365,412.00 2,365,412.00 > 15,465.00 15,465.00 > 4,864.00 4,864.00 > 41,564.00 54,156.00 > 48,642.00 41,564.00 > 1,564,968.00 48,642.00 > 4,589,846.00 1,564,968.00 > 5,852,852.00 4,589,846.00 > 6,458,456.00 5,852,852.00 > > > At the moment I manually do this so, using the above example, I would go > down the list until the amount of 54,156.00 which I would cut and paste > into > a different sheet and then delete the cell with that value so the rest of > the > values on the right move up and match until the final amount on the left > of > 6,458,456.00 which would also be removed as it also doesn't have a match. > > With a couple of thousand items this is very timeconsuming. I'm not sure > if > a vlookup would help or perhaps a macro but any help would be greatly > appreciated. > > Many thanks in advance > > Niall
From: Glenn on 1 Jun 2010 11:41 Assuming your data is in A2:B11, enter the following formulas: C2 =IF(ISNA(MATCH(A2,$B$2:$B$11,0)), ROW(A1)*21,"") D2 =IF(ISNA(MATCH(B2,$A$2:$A$11,0)), ROW(B2)*22,"") E2 =IF(COUNT($C$2:$D$11)>=ROW(A1), SMALL($C$2:$D$11,ROW(A1)),"") F2 =IF(E2="","",INDEX($A$2:$B$11,INT((E2+1)/2), 1+ISEVEN(E2))) Copy C2 and D2 down to the end of your data, Copy E2 and F2 down until you get blanks. "njcr83" wrote: > Hi, > > I am having an issue with comparing columns of values. > > Basically I have a table similar to the below except with a couple of > thousand lines. > Either the first column will have a value that doesn't match with the second > column or vice versa so basically I need Excel (2002) to begin at the top and > compare the values until it finds a mismatch, extract that value (perhaps to > another sheet) and continue down the columns doing the same thing until the > end. > > 46,898,748.00 46,898,800.00 > 2,365,412.00 2,365,412.00 > 15,465.00 15,465.00 > 4,864.00 4,864.00 > 41,564.00 54,156.00 > 48,642.00 41,564.00 > 1,564,968.00 48,642.00 > 4,589,846.00 1,564,968.00 > 5,852,852.00 4,589,846.00 > 6,458,456.00 5,852,852.00 > > > At the moment I manually do this so, using the above example, I would go > down the list until the amount of 54,156.00 which I would cut and paste into > a different sheet and then delete the cell with that value so the rest of the > values on the right move up and match until the final amount on the left of > 6,458,456.00 which would also be removed as it also doesn't have a match. > > With a couple of thousand items this is very timeconsuming. I'm not sure if > a vlookup would help or perhaps a macro but any help would be greatly > appreciated. > > Many thanks in advance > > Niall

Pages: 1 Prev: MultiCondition Formula Next: Finding identical rows in a list 