0

Hi !
I have a column of 'City', now I want to compare the value of each cell of 'City' against the column 'City_Check'; the cell where the value matches, pick the value of 'City_ID' column & replace the city name with that ID in the 'City column'.
* The Image clarifies what I want(Plz see the attachments)... I have my original data file attached as well.
Regards.

3
Contributors
5
Replies
29
Views
4 Years
Discussion Span
Last Post by urtrivedi
0

Hi fashxfreak, daniweb is a great site but you need a help forum that deals specifically with Excel & MS Office applications. I suggest www.thecodecage.com You'll find all the help you'll need for this issue.

As it is, I'll see what I can do for you here.

0

What is the trigger to make this table? Do you want this to populate after each City entry?

0

@Stuugie thx for suggestion man !
Actually I just want a table having 'site_ID' & 'City_ID'. i.e. check the city from column 'B', compare it with all the city names of column 'D', when the match is found, copy the city_id against that city from column 'C' & replace the city name with that city_id in column 'B'.

0

I have worked this out two different ways for you. The first way is by using the WorkSheet_Change event. If you want/need to learn about the worksheet change event then take a look at Google. For the first way, everytime a city is input it will change to the city_ID. This way can be done on the worksheet "Assign ID @ Entry"

The second way is by running the procedure on worksheet "Assign All IDs" which takes the cities as a batch and then converts the names to the IDs.

Let me know if this is close

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.