Robert E Lee
Active Member
- Joined
- Aug 10, 2005
- Messages
- 266
Hi All
I have a workbook with a number of sheets and a second workbook containing data that is to be entered into the first workbook base on a selection parameter. This parameter I have called BC and is contained in block with differing numbers of parameters in Range ("A2") to Range ("A" & 2 +N)
It all works perfectly except that BC always seems to contain nothing so the range to be copied is not selected. (So not so perfect then)
Any assistance appreciated
Rob
I have a workbook with a number of sheets and a second workbook containing data that is to be entered into the first workbook base on a selection parameter. This parameter I have called BC and is contained in block with differing numbers of parameters in Range ("A2") to Range ("A" & 2 +N)
Code:
For Each BC In BR
Set TR = Range(ActiveCell, ActiveCell.Offset(R1, 0))
For Each c In TR
If c =BC Then
Set SelectRange = Range(c.Offset(0, -2), (c.Offset(0, 3)))
SelectRange.Copy Destination:=rs.Range("A" & R)
R = R + 1
End If
Next c
It all works perfectly except that BC always seems to contain nothing so the range to be copied is not selected. (So not so perfect then)
Any assistance appreciated
Rob