Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Mutiple Intersect Ranges for same worksheet - Help!!
The below Macro copies a certain cell's contents over to the next page when
the range (B9:B18) is touched - copies a special note in E5 (of the same page) to the following page - inserts in cell B6. I want to do the same thing for my next range of cells in the same page (B21:B28), but I need a different cell's contents to copy to the next page - E18 (of same page) to next page cell B11. Every time I try to combine the request for the same worksheet, I get an error or it just doesn't work?? Thank you for any thoughts - Jenny __________________________________________________ ___________________________ Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("B9:B16")) _ Is Nothing Then Exit Sub Sheets("Interview Builder").Range("e5").Copy Destination:=Sheets("Definition").Range("b6") End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Mutiple Intersect Ranges for same worksheet - Help!!
I'm assuming the code is in the "Interview Builder" sheet module and the
cells you are copying are in this worksheet - so I didn't fully qualify the copy from ranges. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("B9:B16")) Is Nothing Then Range("e5").Copy Destination:=Sheets("Definition").Range("b6") ElseIf Not Intersect(Target, Range("B21:B28")) Is Nothing Then Range("E18").Copy Destination:=Sheets("Definition").Range("B11") End If End Sub "Jenny B." wrote: The below Macro copies a certain cell's contents over to the next page when the range (B9:B18) is touched - copies a special note in E5 (of the same page) to the following page - inserts in cell B6. I want to do the same thing for my next range of cells in the same page (B21:B28), but I need a different cell's contents to copy to the next page - E18 (of same page) to next page cell B11. Every time I try to combine the request for the same worksheet, I get an error or it just doesn't work?? Thank you for any thoughts - Jenny __________________________________________________ ___________________________ Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("B9:B16")) _ Is Nothing Then Exit Sub Sheets("Interview Builder").Range("e5").Copy Destination:=Sheets("Definition").Range("b6") End Sub |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Mutiple Intersect Ranges for same worksheet - Help!!
Thank you so much - I worked like a CHAMP!!
"JMB" wrote: I'm assuming the code is in the "Interview Builder" sheet module and the cells you are copying are in this worksheet - so I didn't fully qualify the copy from ranges. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("B9:B16")) Is Nothing Then Range("e5").Copy Destination:=Sheets("Definition").Range("b6") ElseIf Not Intersect(Target, Range("B21:B28")) Is Nothing Then Range("E18").Copy Destination:=Sheets("Definition").Range("B11") End If End Sub "Jenny B." wrote: The below Macro copies a certain cell's contents over to the next page when the range (B9:B18) is touched - copies a special note in E5 (of the same page) to the following page - inserts in cell B6. I want to do the same thing for my next range of cells in the same page (B21:B28), but I need a different cell's contents to copy to the next page - E18 (of same page) to next page cell B11. Every time I try to combine the request for the same worksheet, I get an error or it just doesn't work?? Thank you for any thoughts - Jenny __________________________________________________ ___________________________ Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("B9:B16")) _ Is Nothing Then Exit Sub Sheets("Interview Builder").Range("e5").Copy Destination:=Sheets("Definition").Range("b6") End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
If then formulas | Excel Worksheet Functions | |||
How:Add New Worksheet that copies the cell of the previous sheet | Excel Worksheet Functions | |||
Mass Creation of Named Ranges? | Excel Discussion (Misc queries) | |||
automate printing different ranges on 1 worksheet at different tim | Excel Discussion (Misc queries) |