R
Robert
Could someone please help me with code for a routine which is part of a
longer macro. At the point where the routine is needed, my document
contains two similar tables. Table 2 is a look-up table from which data
is copied into Table 1 before being deleted.
Each cell contains just one word - apart from a few blanks. Without
using "Find" (for complex reasons) I need to scan Table 1 Column 1 for
words carrying a blue background formatting. When one is found,
attention turns to Table 2 Column 1 which must then be scanned for a
matching word (minus the formatting).
If a match is found, further words from the "matching" row in Table 2
Columns 2 and 3 (but not Column 1) are now copied to Table 1 Columns 2
and 3 (that is, back into the row where the scanning stopped). The
cells which receive these words will be blank.
If no match is found, nothing is written into Table 1 and the scanning
resumes with the next word from Table 1 Column 1, stopping at the end
of the Column.
"Find" would be quicker, I know, but speed is not important in this
case.
I am quite unable to get my head round this, so any help will be most
gratefully received.
Thanks in advance,
Robert
longer macro. At the point where the routine is needed, my document
contains two similar tables. Table 2 is a look-up table from which data
is copied into Table 1 before being deleted.
Each cell contains just one word - apart from a few blanks. Without
using "Find" (for complex reasons) I need to scan Table 1 Column 1 for
words carrying a blue background formatting. When one is found,
attention turns to Table 2 Column 1 which must then be scanned for a
matching word (minus the formatting).
If a match is found, further words from the "matching" row in Table 2
Columns 2 and 3 (but not Column 1) are now copied to Table 1 Columns 2
and 3 (that is, back into the row where the scanning stopped). The
cells which receive these words will be blank.
If no match is found, nothing is written into Table 1 and the scanning
resumes with the next word from Table 1 Column 1, stopping at the end
of the Column.
"Find" would be quicker, I know, but speed is not important in this
case.
I am quite unable to get my head round this, so any help will be most
gratefully received.
Thanks in advance,
Robert