Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I compare values in two arrays in Excel? | Excel Discussion (Misc queries) | |||
Compare arrays | Excel Worksheet Functions | |||
Compare arrays | Excel Worksheet Functions | |||
Compare data in three fields | Excel Discussion (Misc queries) | |||
Pivot Table - Compare 2 fields? | Excel Discussion (Misc queries) |