Hi,
I have a rather large table (5760 rows and 10 columns) and another table of the same sort of data(1440 rows and 10 columns). What I need to do is find for each row in the smaller table, the row in the larger table which has the least sum of differences (ie. the minimum of "column 1, table 1 - column 1, table 2" + "column 2, table 1 - column 2, table 2" + .... up to column 9) and once I identify which row is closest, I need to get the number in the 10th column of the larger table.
I was able to do this for one row of the small table by making a new table where each column had for example- =$A$1-L1 (where table 1 is A1:J1440 and table 2 is L1:U5760) and filling out another 5760*9 table, with the 10th column (the value I needed) copied across, then taking the sum of each row, then putting the sum column first, reordering the rows from smallest to largest (since apparently vlookup only works if they're in order, which required me to copy the table out using values so that all the formulae didn't just recalculate), finding the minimum of the sum column and then using =vlookup(the minimum value I found, table 3, 11)....
So that did it for one row, I need this value for all 1440. I would ideally like to find that there's really some function like =min((A1-LX)+(B1-MX)+(C1-NX)....) where it was possible to check all the X's, but have them always look at the same row, not just find the individual best matches for each column.
It's hard to explain but I hope that helped.
I have a rather large table (5760 rows and 10 columns) and another table of the same sort of data(1440 rows and 10 columns). What I need to do is find for each row in the smaller table, the row in the larger table which has the least sum of differences (ie. the minimum of "column 1, table 1 - column 1, table 2" + "column 2, table 1 - column 2, table 2" + .... up to column 9) and once I identify which row is closest, I need to get the number in the 10th column of the larger table.
I was able to do this for one row of the small table by making a new table where each column had for example- =$A$1-L1 (where table 1 is A1:J1440 and table 2 is L1:U5760) and filling out another 5760*9 table, with the 10th column (the value I needed) copied across, then taking the sum of each row, then putting the sum column first, reordering the rows from smallest to largest (since apparently vlookup only works if they're in order, which required me to copy the table out using values so that all the formulae didn't just recalculate), finding the minimum of the sum column and then using =vlookup(the minimum value I found, table 3, 11)....
So that did it for one row, I need this value for all 1440. I would ideally like to find that there's really some function like =min((A1-LX)+(B1-MX)+(C1-NX)....) where it was possible to check all the X's, but have them always look at the same row, not just find the individual best matches for each column.
It's hard to explain but I hope that helped.