Thanks so much, Art. I'll try it. I better rest on Joshua 1:9 on this one
for sure...
"Art" wrote in message
...
Barry,
I'm not sure how much of a novice you are, but you may be able to just
copy
this stuff.
You'll need to get the Visual Basic Editor -- Press Alt-F11 or go to the
Tools/Macro menu.
Once there, you should see the name of your Excel file. Under it you
should
see a listing of your worksheets. Click on any of the sheets, just so
you've
selected the correct Excel file. Then, from the menu, insert module --
not
class module.
Once you've done that you should now see a folder that says Modules, and
under it Module1. Double click on Module1 and you'll probably see a blank
screen that says Option Explicit.
Paste the code from my previous post under that (I've included Option
Explicit -- you don't need two of them).
Now, you will probably have to edit the code that I sent to you.
First you'll see 4 statements that start with Const. The numbers at the
end
should correspond to the columns in your worksheet -- change them to the
correct numbers.
A little further down you'll see Sheets("Sheet1"). Replace Sheet1 with
the
name of the worksheet that you're working with.
Next, look for:
If Cells(Index1, 1) = Cells(Index2, 7) Then
Range(Cells(Index1, 1), Cells(Index1, 5)).Select
The numbers 1, 7, 1 and 5 need to change to have the columns you're
working
on. for example, if list1 is in columns C through H, and list2 is in
columns
K through N, you'll need:
If Cells(Index1, 3) = Cells(Index2, 11) Then
Range(Cells(Index1, 3), Cells(Index1, 8)).Select
Then, with you cursor somewhere in that code, hit F5. This should run the
code that will adjust your worksheet.
PLEASE make sure you save your file before you hit F5 -- it will delete
data, you want to be able to get back to it if necessary, and UNDO WILL
NOT
work.
I hope I didn't leave anything out, but it is somewhat detailed.
Should you decide to wade into this -- good luck.
For what it's worth, I completely agree with your closing comments!
Art
|