I'm working on the following piece of code:
For Each x In Monday1
For Each y In Shiftrange
If y.Value = x.Value Then
ActiveCell.PasteSpecial Paste:=xlValues, Operation:=xlNone
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
(The "Monday1" in line 2 is a variable, a specific set of cells on the "Monday1" Worksheet. Shiftrange is another
variable, a specific set of cells on the "Front Page" Worksheet.)
This is designed to look at the shift name next
to a staff (e.g. 0800-1600), then check for that value on the Front Page, select the data next to the 0800-1600 entry and
return it to the first page.
My problem is with the line:
just selecting the one cell to the right of "y" (as it does now), I'd like it to select a range, from the cell one column
over, to the cell 56 columns over.
Any help will be most gratefully appreciated!
Thanks in advance,
PS - reading this back I'm not sure how clear it is, please let me know if I can clarify anything?