Re: find data in adjacent cell

Giganews Newsgroups
Subject: Re: find data in adjacent cell
Posted by:  mrice (mrice.28guwm_1148733601.152@excelforum-nospam.com)
Date: Sat, 27 May 2006

This can be done by macro by using your names in the target sheet as
search criteria on your rubish sheet.

The following macro should work, you will need to change the sheet
names and ranges to the ones that you actually have.

Sub GetData()
Sheets("Target sheet").Select
Set DataRange = Range(Cells(1, 1), Cells(1, 400))
For Each Cell In DataRange
Cell.Offset(0, 1) = Sheets("Rubbish").Cells.Find(Cell, , xlValues,
xlWhole).Offset(2, 0)
Next Cell
End Sub

--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile:http://www.excelforum.com/member.php?action=getinfo&userid=10931
View this thread:http://www.excelforum.com/showthread.php?threadid=546150

Replies

None

In response to

find data in adjacent cell posted by Leon Jaeggi on Sat, 27 May 2006