View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson[_4_] Greg Wilson[_4_] is offline
external usenet poster
 
Posts: 218
Default Maybe this isn't possible to match name and copy?

Oops...

Toronto should have been "mno" in Cell B1 of Sheet3. Typo
not code error.

Regards,
Greg

-----Original Message-----
For my test using the second code offering I set the
workbook up as follows:

In Sheet1 I entered the following city names and adjacent
text values intended to represent email
addresses. "Chicago" in Cell A1 and "abc" in Cell B1 and
the remainder immediately below as shown:

COL. A__________COL. B
Chicago___________abc
Paris_____________def
Montreal__________ghi
Portland__________jkl
Toronto___________mno
Denver____________pqr
Washington________stu
Dallas____________vwx
Halifax___________yz

In Sheet2 in Cell A1 I entered "Chicago" and put an "x"
immediately below in Cell A2. This was to show that the
data in this cell does not get overwritten. I then
entered "Toronto" in Sheet3 (Cell A1) and put an "x"

below
it also. I continued this for 7 sheets putting different
names in Cell A1 of each and an "x" immediately below the
names. The code is designed to handle as many sheets as
there are in the workbook so the number 7 is irrelevant.

Results were as follows:

<Sheet2
Cell A1: "Chicago"
Cell A2: "abc"
Cell A3" "x"

<Sheet3
Cell A1: "Toronto"
Cell A2: "def"
Cell A3" "x"

<Sheet4
Cell A1: "Montreal"
Cell A2: "ghi"
Cell A3: "x"

<Sheet5
Cell A1: "Halifax"
Cell A2: "yz"
Cell A3: "x"

<Sheet6
Cell A1: "Portland"
Cell A2: "jkl"
Cell A3: "x"

<Sheet7
Cell A1: "Dallas"
Cell A2: "vwx"
Cell A3: "x"

The above was my understanding of what you were looking
for. I suspect that your workbook is set up different

and
that is why it didn't work. My first code offering was
far more general and looks anywhere in the used range of
the other sheets for the names. I believe that is why

you
had some success.

Let me know how the mechanics of my test is different

from
your needs.

Regards,
Greg

PS: I am aware of a syntax error in my first code
offering. I will correct it if we end up using it.

.