How to write a macro to lookup rows


i have 2 worksheets with hundreds of thousands of rows of cost centers. I would need to do a lookup of Cost Centers in worksheet 1 with worksheet 2 and whether Cost Centers in worksheet 1 exist in worksheet 2. Vlookup is very prone to error and takes a lot of memory to run. How do i write a macro to help me to do this. (i am not a programmer).