Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Duplicate a code
Hi,
I need to duplicate the following code in the same worksheet, but in a different colum. and not in "Target.Row = A;B;C3 And Target.Column = A;B;C 3": Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 3 Then 'calculate criteria cell in case calculation mode is manual Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Range("A6:D6"), Unique:=False End If End Sub =============================== Kind regards, |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Duplicate a code
Not sure what you are asking.
Do you want it to work for all cells, except A3,B3 and C3? Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Mona" wrote in message ... Hi, I need to duplicate the following code in the same worksheet, but in a different colum. and not in "Target.Row = A;B;C3 And Target.Column = A;B;C 3": Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 3 Then 'calculate criteria cell in case calculation mode is manual Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Range("A6:D6"), Unique:=False End If End Sub =============================== Kind regards, |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Duplicate a code
Not sure what you are asking.
I am talking about a datavalidation list on Apps-List. Do you want it to work for all cells, except A3,B3 and C3? I want it to create the list on A3,B3 and C3. Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? It copies now from Apps-Owners to Apps-List. the idea is to create a list on Apps-List sheet (A3,B3 and C3)which copy data from Apps-Owners. When a "Applications Modules" or "Process Owners " or "Entity" is selected, a data is copied from Apps-Owners to Apps-List on (A6,B6 and C6). Regards, Mona "Bob Phillips" wrote: Not sure what you are asking. Do you want it to work for all cells, except A3,B3 and C3? Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Mona" wrote in message ... Hi, I need to duplicate the following code in the same worksheet, but in a different colum. and not in "Target.Row = A;B;C3 And Target.Column = A;B;C 3": Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 3 Then 'calculate criteria cell in case calculation mode is manual Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Range("A6:D6"), Unique:=False End If End Sub =============================== Kind regards, |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Duplicate a code
Not tested, but try this
Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A3,B3,C3" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Worksheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Target.Offset(3, 0), Unique:=False End With End If ws_exit: Application.EnableEvents = True End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Mona" wrote in message ... Not sure what you are asking. I am talking about a datavalidation list on Apps-List. Do you want it to work for all cells, except A3,B3 and C3? I want it to create the list on A3,B3 and C3. Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? It copies now from Apps-Owners to Apps-List. the idea is to create a list on Apps-List sheet (A3,B3 and C3)which copy data from Apps-Owners. When a "Applications Modules" or "Process Owners " or "Entity" is selected, a data is copied from Apps-Owners to Apps-List on (A6,B6 and C6). Regards, Mona "Bob Phillips" wrote: Not sure what you are asking. Do you want it to work for all cells, except A3,B3 and C3? Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Mona" wrote in message ... Hi, I need to duplicate the following code in the same worksheet, but in a different colum. and not in "Target.Row = A;B;C3 And Target.Column = A;B;C 3": Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 3 Then 'calculate criteria cell in case calculation mode is manual Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Range("A6:D6"), Unique:=False End If End Sub =============================== Kind regards, |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Duplicate a code
Thanks
"Bob Phillips" wrote: Not tested, but try this Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A3,B3,C3" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Worksheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Target.Offset(3, 0), Unique:=False End With End If ws_exit: Application.EnableEvents = True End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Mona" wrote in message ... Not sure what you are asking. I am talking about a datavalidation list on Apps-List. Do you want it to work for all cells, except A3,B3 and C3? I want it to create the list on A3,B3 and C3. Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? It copies now from Apps-Owners to Apps-List. the idea is to create a list on Apps-List sheet (A3,B3 and C3)which copy data from Apps-Owners. When a "Applications Modules" or "Process Owners " or "Entity" is selected, a data is copied from Apps-Owners to Apps-List on (A6,B6 and C6). Regards, Mona "Bob Phillips" wrote: Not sure what you are asking. Do you want it to work for all cells, except A3,B3 and C3? Does it copy the same data to the same area of Apps-Owners regardless of which cell changes? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Mona" wrote in message ... Hi, I need to duplicate the following code in the same worksheet, but in a different colum. and not in "Target.Row = A;B;C3 And Target.Column = A;B;C 3": Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 3 Then 'calculate criteria cell in case calculation mode is manual Worksheets("Apps-Owners").Range("G2").Calculate Worksheets("Apps-Owners").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheets("Apps-Owners").Range("G3:G4"), _ CopyToRange:=Range("A6:D6"), Unique:=False End If End Sub =============================== Kind regards, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
regular code module | Excel Discussion (Misc queries) | |||
code not unique find latest date | Excel Discussion (Misc queries) | |||
Conform a total to a list of results? | Excel Discussion (Misc queries) | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
close form code | Excel Discussion (Misc queries) |