Hi everyone!
I have a sheet with thousand of records and I have to run a specific function on one of the columns. The latter contains a large number of duplicates. I set up a new function with VB, but I cannot run it on all the data due to the required computational effort. Therefore I thought to create a new column without replicates, and to run the function on this new column.
However, I do not have a clue on how I can assign the new values (obtained running the function on the new column) to the entries of the original table. I thought to do that with a series of nested IF, but it would be simply impossible due to the high amount of data.
Here a simple table to exemplify my problem:
<tbody>
</tbody>
As you can see in the table, I have a list of rows (identified by a keys), each of which has an attribute "city". Suppose that with my VB function I am able to calculate the preferred food of the inhabitants given the name of the city. The function is quite expensive and I cannot run it over all my entries: therefore I create a new column without replicates, and I run the function on this new set. Then I have to re-assign the outcome of the functions to my initial set of rows...
Any suggestion on how I should do?
Thank you in advance for your time!
I have a sheet with thousand of records and I have to run a specific function on one of the columns. The latter contains a large number of duplicates. I set up a new function with VB, but I cannot run it on all the data due to the required computational effort. Therefore I thought to create a new column without replicates, and to run the function on this new column.
However, I do not have a clue on how I can assign the new values (obtained running the function on the new column) to the entries of the original table. I thought to do that with a series of nested IF, but it would be simply impossible due to the high amount of data.
Here a simple table to exemplify my problem:
Key | City (with replicates) | Preferred food of the citizens | City (without replicates) | Preferred food of the citizens | |
1 | Chicago | Chicago | Hamburger | ||
2 | Londra | New York | Pizza | ||
3 | Roma | Roma | Pasta | ||
4 | Londra | Londra | Fish&Chips | ||
5 | Roma | ||||
6 | Roma | ||||
7 | New York | ||||
8 | Londra | ||||
9 | Chicago |
<tbody>
</tbody>
As you can see in the table, I have a list of rows (identified by a keys), each of which has an attribute "city". Suppose that with my VB function I am able to calculate the preferred food of the inhabitants given the name of the city. The function is quite expensive and I cannot run it over all my entries: therefore I create a new column without replicates, and I run the function on this new set. Then I have to re-assign the outcome of the functions to my initial set of rows...
Any suggestion on how I should do?
Thank you in advance for your time!