A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

V-Lookup variation query



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 03:48 PM posted to microsoft.public.excel.worksheet.functions
njcr83
external usenet poster
 
Posts: 1
Default V-Lookup variation query

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 mis-match, 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 time-consuming. I'm not sure if
a v-lookup would help or perhaps a macro but any help would be greatly
appreciated.

Many thanks in advance

Niall
  #2  
Old June 1st, 2010, 03:59 PM posted to microsoft.public.excel.worksheet.functions
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default V-Lookup variation query

One way. copy col b to the end of col adelete col bsort col ause 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(i-1,1)=cells(i,1) the rows(i).delete
next i
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"njcr83" wrote in message
...
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 mis-match, 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 time-consuming. I'm not sure
if
a v-lookup would help or perhaps a macro but any help would be greatly
appreciated.

Many thanks in advance

Niall


  #3  
Old June 1st, 2010, 04:41 PM posted to microsoft.public.excel.worksheet.functions
glenn
external usenet poster
 
Posts: 216
Default V-Lookup variation query

Assuming your data is in A2:B11, enter the following formulas:

C2 =IF(ISNA(MATCH(A2,$B$2:$B$11,0)),
ROW(A1)*2-1,"")

D2 =IF(ISNA(MATCH(B2,$A$2:$A$11,0)),
ROW(B2)*2-2,"")

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 mis-match, 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 time-consuming. I'm not sure if
a v-lookup would help or perhaps a macro but any help would be greatly
appreciated.

Many thanks in advance

Niall

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.