View Full Version : Compare Data from one sheet to another

09-30-2008, 12:17 PM
I need help creating code for what I am trying to accomplish in Excel 2003.

I have two tabs, Tab 1 and Tab 2. In Tab 1, I have a database query that is refreshed on a daily basis. In Tab 2, I have rows of data that I have copied from Tab 1. So Tab 2 is a history of data copied from Tab 1.

I would like code that would copy rows of data from Tab 1 into Tab 2 if a certain cell in the row is indicated as "yes" and that row is not a duplicate in Tab 2.

I hope this makes sense.

Thank you

09-30-2008, 12:31 PM
if you want to compare 2cell values you can use IF function to compare them , and then use a vlookup to bring the rest of columns

for if

one you have done this in a column , you can bring by vlookup the others value.
Put an examples file , it will be more easy.

09-30-2008, 04:37 PM
Good Afternoon.

From the sounds of it, what you are trying to do sounds very similar to a solution I helped provide via this post. In the other post, she wanted to copy the Entire Row from Sheet 1 to Sheet 2 if a certain Column contained a value greater than 0. Your project sounds very similar.

If this doesn't help, let me know where you're stuck.