Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default finding values quick

hello

i have a sheet (one) with about 4000 rows of values, in colom A there
are 35 possible values and in colom B 700 possible values. combinations
can appear multiple times

In a second sheet i have colom B with the same 700 values as in colom B
of sheet one, and in colom A for each of these 700 values one of the 35
possible values. The 700 values are unique in this sheet.


Now i need to examen these 4000 rows and compare each value in colom B
with the same value in the second sheet colom B, if these match i need
to check if the values in the A coloms are the same.

I have this running with brute force FOR NEXT loops, but it take about
20 minutes to complete.

Does anybody have an idea how to speed it up.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default finding values quick

Why not introduce a third column which combines A and B and then use a
simple (and fast!) lookup with the combined A and B from the other sheet?
Sorry if I misunderstood your question
--

Kind Regards,

Niek Otten

Microsoft MVP - Excel


"nom de plume" wrote in message
...
hello

i have a sheet (one) with about 4000 rows of values, in colom A there are
35 possible values and in colom B 700 possible values. combinations can
appear multiple times

In a second sheet i have colom B with the same 700 values as in colom B of
sheet one, and in colom A for each of these 700 values one of the 35
possible values. The 700 values are unique in this sheet.


Now i need to examen these 4000 rows and compare each value in colom B
with the same value in the second sheet colom B, if these match i need to
check if the values in the A coloms are the same.

I have this running with brute force FOR NEXT loops, but it take about 20
minutes to complete.

Does anybody have an idea how to speed it up.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default finding values quick

Niek Otten wrote:
Why not introduce a third column which combines A and B and then use a
simple (and fast!) lookup with the combined A and B from the other sheet?
Sorry if I misunderstood your question


Do not be sorry, I've been stuppid to say i need a match while i really
need the no matches. I tryed and thought about your (i'am sure verry
fast) solution. but i can't see how find the no matches with a third
colom because there are also many values in sheet one that have no match
in sheet two but where i'am not intressted in and combining can create
new values witch can cause unwanted matches


Maybe an example clears it up what i'am looking for

sheet one sheet two
colom colom colom colom
A B A B
45 45 110 2100
110 2102 110 2102
120 2102 120 2104
120 2104 120 2106
130 2106 130 2108
130 2106 130 2110
130 2108
130 2110
140 2110

In this example i need the number of row 3 and the number of the last
row of sheet one,

Because 2102 in sheet two is assigened to 110 , however colom A in sheet
one says 120 coppled to 2102,
and the last row of sheet one because, 2110 is assigened 140 , but in
sheet two 2110 is coppled to 130.

Hope someone can make sence of this
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default finding values quick

column C (start in C2) in each would be the formula

=TEXT(A2,"000")&"-"&TEXT(B2,"0000")

drag fill down column C in each sheet

In D2 of sheet1

=if(countif(Sheet2!C:C),C2)=0,"Unique","Match")

then drag fill down the sheet.


Now you can filter on column D of sheet1 using Data=Filter=Autofilter.
Select Unique

--
Regards,
Tom Ogilvy



"nom de plume" wrote in message
...
Niek Otten wrote:
Why not introduce a third column which combines A and B and then use a
simple (and fast!) lookup with the combined A and B from the other

sheet?
Sorry if I misunderstood your question


Do not be sorry, I've been stuppid to say i need a match while i really
need the no matches. I tryed and thought about your (i'am sure verry
fast) solution. but i can't see how find the no matches with a third
colom because there are also many values in sheet one that have no match
in sheet two but where i'am not intressted in and combining can create
new values witch can cause unwanted matches


Maybe an example clears it up what i'am looking for

sheet one sheet two
colom colom colom colom
A B A B
45 45 110 2100
110 2102 110 2102
120 2102 120 2104
120 2104 120 2106
130 2106 130 2108
130 2106 130 2110
130 2108
130 2110
140 2110

In this example i need the number of row 3 and the number of the last
row of sheet one,

Because 2102 in sheet two is assigened to 110 , however colom A in sheet
one says 120 coppled to 2102,
and the last row of sheet one because, 2110 is assigened 140 , but in
sheet two 2110 is coppled to 130.

Hope someone can make sence of this



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default finding values quick

Tom Ogilvy wrote:
column C (start in C2) in each would be the formula

=TEXT(A2,"000")&"-"&TEXT(B2,"0000")

drag fill down column C in each sheet

In D2 of sheet1

=if(countif(Sheet2!C:C),C2)=0,"Unique","Match")

then drag fill down the sheet.


Now you can filter on column D of sheet1 using Data=Filter=Autofilter.
Select Unique

it was so close with Niek's suggestion and with this i got it working,
And it has shaved of a lot of time

Thanks both Tom en Niek
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
hide 0 values in quick access toolbar (Excel 2007) Jaap van der Velden Excel Worksheet Functions 0 January 12th 09 01:28 PM
Finding Most Recent Values in Col1 -- Summing Matching Values Rothman Excel Discussion (Misc queries) 5 December 20th 07 08:19 PM
Finding values jonas.ornborg Excel Worksheet Functions 1 March 6th 06 04:38 PM
finding values and displaying adjacent values willy3211 Excel Worksheet Functions 1 October 12th 05 04:49 PM
Finding Max values Al Excel Worksheet Functions 1 June 24th 05 04:58 PM


All times are GMT +1. The time now is 09:46 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"