Most efficient method to lookup and change data

jimrward

Well-known Member
Joined
Feb 24, 2003
Messages
1,899
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
  8. 2003 or older
Platform
  1. Windows
I have a large table of which one of the columns is customername over the years due to name changes, bad typing etc some of the names have become garbled
Currently I have a small lookup table with garbledname, preferredname which I buffer
I then create a custom column namechange which gets to either -1 no match or position in buffer
I then add another custom column pname which gets set to customername or the preferredname
I know there is an extra step and I could have combined them to say
If list.positionof…. =-1 then
Either way it requires a lookup and effectively an index
As a double lookup has always been bad practice in excel is there a better more efficient method
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
make a record out of your lookup table using Record.FromList(lookup_tbl[preferredname], lookup_tbl[garbledname]). Then use Record.FieldOrDefault to get preferredname from this record.
 
Upvote 0

Forum statistics

Threads
1,224,922
Messages
6,181,777
Members
453,065
Latest member
jfrsanders

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top