Best way to search/replace data in large dataset

Brutusar

Board Regular
Joined
Nov 23, 2019
Messages
166
Office Version
  1. 365
Platform
  1. Windows
Hi, I have excel sheets that have a city name and a country in two colums. I need to do a search and replace in order to get the UNLOAD codes in the third column. For example. New York, USA has the port load code USNYC. So, Col A = New York. Col B = USA After a search and replace Col C should = USNYC.

This is probably best done in two operations. First finding the country code as there is only 250 of them so it should not take too much. However, the full port code list is over 100 000 rows. So if the countries are found first it can be used to limit the total numbers of port codes to look thru by filtering on the countries needed.

Does anyone have any thoughts on how to do this best?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Which columns are the country, City & code in on the list?
 
Upvote 0
Ok how about
Excel Formula:
=FILTER(Sheet1!$C$2:$C$100000,(Sheet1!$A$2:$A$100000=A2)*(Sheet1!$B$2:$B$100000=B2))
Change sheet1 to the name of the sheet with the codes.
 
Upvote 0
Not sure if I have explained well enough (I am terrible at explaining) I need to find the portcode for maybe 300 ports at the time, and then save the result.. Will your suggestion do that? (Apart from the saving of course)
 
Upvote 0
Yes you can just drag that formula down however many rows of data you need.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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