Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Arrays: compare fields?

Hello,

I have a problem that I just cannot solve myself.
Please, if you have knowledge that can get me on track, post a
comment.

Here it goes..

I have two sheets, with rather big amounts of data.
They consist of imported txt-files, and can vary in row-size (the
columns are fixed and always the same)

After my last import, sheet one consist of roughly 5000 rows, and
sheet two of roughly 2000 rows.

They both consist of 26 columns. The columns consist of various data
types; text, integers, percent values, dates etc.

What I want to do is to compare the tables based on the value in the
leftmost columns in both tables (these are project-numbers in both
tables) and store the matching data on the same rows on a third sheet
(this will then have 52 columns).

First, I did this by looping, but this takes way to much time, so I
want to read both tables into two-dimensional arrays, and either build
the matched rows into a third array and write this third array into
sheet 3 (or alternatively, write the matched rows directly to sheet
3).

I cannot get this to work. It finishes, but the matches are incorrect.

Hope to get some replies; I have a deadline on this tomorrow - UGH!



Best regards
NorTor

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Arrays: compare fields?

NorTor.
Check out Chip Pearson's page. Should give you a start in Excel or VBA.
http://www.cpearson.com/excel/duplicat.htm

NickHK

"NorTor" wrote in message
...
Hello,

I have a problem that I just cannot solve myself.
Please, if you have knowledge that can get me on track, post a
comment.

Here it goes..

I have two sheets, with rather big amounts of data.
They consist of imported txt-files, and can vary in row-size (the
columns are fixed and always the same)

After my last import, sheet one consist of roughly 5000 rows, and
sheet two of roughly 2000 rows.

They both consist of 26 columns. The columns consist of various data
types; text, integers, percent values, dates etc.

What I want to do is to compare the tables based on the value in the
leftmost columns in both tables (these are project-numbers in both
tables) and store the matching data on the same rows on a third sheet
(this will then have 52 columns).

First, I did this by looping, but this takes way to much time, so I
want to read both tables into two-dimensional arrays, and either build
the matched rows into a third array and write this third array into
sheet 3 (or alternatively, write the matched rows directly to sheet
3).

I cannot get this to work. It finishes, but the matches are incorrect.

Hope to get some replies; I have a deadline on this tomorrow - UGH!



Best regards
NorTor



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
How do I compare values in two arrays in Excel? Irrylath Excel Discussion (Misc queries) 1 August 1st 08 12:51 AM
Compare arrays mavxob Excel Worksheet Functions 5 March 6th 08 10:55 PM
Compare arrays youngster Excel Worksheet Functions 3 July 31st 07 04:36 PM
Compare data in three fields tssgraham Excel Discussion (Misc queries) 5 June 8th 07 09:57 PM
Pivot Table - Compare 2 fields? Erin Excel Discussion (Misc queries) 0 June 1st 06 08:28 PM


All times are GMT +1. The time now is 03:17 AM.

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"