View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
DataCollector[_8_] DataCollector[_8_] is offline
external usenet poster
 
Posts: 1
Default if cell value matches then copy another cell


Here's a manual way to do it...

Add a new worksheet, copy Column A and C from your Sheet2 into th
Column A and B of the new worksheet. Give the range (both columns)
name like MyData and sort it on Column A

Skip a few columns over and paste the data from Sheet1. Sort on th
first column (the once that should match Column A)

Let's say the data from Sheet1 starts in Column H2. In G2, immediatel
to the left of the data from Sheet1, type = Vlookup(H2(the cel
immediately to the right),MyData, 2,FALSE)
Copy the formula all the way down your column of data. If there is
match for H2 in MyData, the formula will result in the value in Colum
B (which is your Column C that you wanted to add to Sheet1.

When you're satisfied that everything looks okay, do a Copy, Past
Special on the new column created with the formula (to retain the valu
rather than the formula) and delete Columns A and B and cut, paste th
resultant column into the position you want it.

It's really pretty fast once you get the hang of it

--
DataCollecto
-----------------------------------------------------------------------
DataCollector's Profile: http://www.hightechtalks.com/m36
View this thread: http://www.hightechtalks.com/t229516