Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
nexted for next loops
I am interested in comparing the data in 2 ranges. I want to loop through
each cell in the first loop one at a time and compare it to the data in the second loop. When the values in both cells are equal then i would like to copy associated data from the column of the first range to the column of the second range. Dim mp As String Dim frmt As String For Each c In Worksheets("map check").Range("s4:at4").cells Let mp = c.Value For Each d In Worksheets("format").Range("g1:ah1").cells Let frmt = d.Value If mp = frmt Then Windows("PanelSelect.xls").Activate Sheets("Map Check").Select With ActiveSheet .Range(.cells(4, ActiveCell.Column), _ .cells(20, ActiveCell.Column)).Select End With Selection.Copy Windows("PanelSelect.xls").Activate Sheets("format").Select Selection.PasteSpecial paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False End If Next d Next c any help is greatly appreciated? suggestions on other methods to accomplish my goal. dr chuck |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
REVISED Nexted IF and Countif | Excel Worksheet Functions | |||
Nexted if()s are limited to Seven What other functions can I use? | Excel Worksheet Functions | |||
Loops | Excel Programming | |||
Loops | Excel Programming | |||
LOOPS | Excel Programming |