Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want to go down the list on sheet2 D column and compare to sheet1 A column and if a match copy column A .Offset(0, 1) back to sheet2 column D .Offset(0, 1). I can't sniff out the type mismatch error I'm getting. Then I need to do the same thing as this code but do it between two workbooks. Thanks, Howard Option Explicit Sub S_1ToS_2() Dim c As Range Dim c1 As Variant For Each c In Sheets(Sheet2).Range("D1:D10") For Each c1 In Sheets(Sheet1).Range("A1:A25") If c1.Value = c.Value Then c1.Offset(0, 1).Copy c.Offset(0, 1) End If Next Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help to DEBUG this line of code. Type mismatch error | Excel Programming | |||
Type Mismatch error in VBA code | Excel Programming | |||
[Q] Save As throws type mismatch error in control's code? | Excel Discussion (Misc queries) | |||
type mismatch in this code | Excel Programming | |||
Code works 1st time then Type Mismatch when checking for not blank cells | Excel Programming |