I am trying to compare cells from a temporary worksheet to columns in different worksheets. Fields in temp are: Item, In/Out, Location, and ID

Situation 1: Item is listed in "Temp" (temporary worksheet) and is already in sheet1. The row that matches the item in sheet1 will need to be updated from the fields in "Temp".

Situation 2: Item from "Temp" is not listed in sheet1. Sheet2 is searched through to find the item title. Then the item, the fields from "Temp" and the item title (from sheet2) is input into sheet1.

Situation 3: Item from "Temp" is not found in either sheet. The item will be input into sheet2 as well as sheet1 without an item title.

To accomplish this I tried to use if statements with vlookup and a loop. Here is my attempt. I have omitted irrelevant code. I am not sure if my IF statements are working well. I think this may be because they are not activating the cell that matches my CBC, or ITEM, variable. How should I go about selecting this cell as well as using the vlookup properly?

Please Login or Register  to view this content.