ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find replace function with a database (https://www.excelbanter.com/excel-programming/312972-find-replace-function-database.html)

kauseway[_2_]

find replace function with a database
 

Hello All,

What a great group and wonderful resource. I have searched for what
am looking for but cannot. I am trying to do the following:

My first excel sheet has the following.
Column a has many names. Some names vary slightly.

fedex 39393
fedex 393939090
fedex 2skd94
lowes
qvc
kinkos
exxon
exxon ie9d3k3
home depot 2334342
hope depot 222222

column B currently contains only one name or category for all the name
in column A. EX

expenses
expenses
expenses

I would like to create some sort of database or 2nd excel sheet wit
that would contain my reference information:

NAME CATEGORY
Fedex Shipping
exxon gas
Home Depot Supplies

Then I want a macro to search my first excel sheet. When it find
(fedex) in column a it then replaces the old category (expenses) wit
the correct category from my reference data base to (shipping). I
would need to automatically do this for every name/category in m
reference sheet until it reached the end. Since the names var
slightly it would also need to be able to catch the variations. I a
not sure if this can be done all together or in a two step process.
Meaning the first step conditions the name list with a find replace
(find *fedex* replace fedex) so that there is no variations in th
name. The second step would then replace the category names with th
proper name. Or if this can be done all in one step or macro. Thank
for eveyones help and I hope I was somewhat clear.

k

--
kausewa
-----------------------------------------------------------------------
kauseway's Profile: http://www.excelforum.com/member.php...fo&userid=1512
View this thread: http://www.excelforum.com/showthread.php?threadid=26761



All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com