Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 122
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup query StephenAccountant Excel Worksheet Functions 3 December 10th 07 04:54 AM
Lookup query Jax Excel Discussion (Misc queries) 4 October 29th 07 09:59 PM
Variation from the mean? Greenwich_Man Charts and Charting in Excel 1 September 25th 07 03:14 PM
SUMIF variation? Bob Newman Excel Worksheet Functions 8 June 18th 06 09:13 PM
variation on countif? Liz G Excel Worksheet Functions 2 November 1st 04 07:34 PM


All times are GMT +1. The time now is 12:24 PM.

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

About Us

"It's about Microsoft Excel"