Select range from active cell to copy to other sheet.

KyleJackMorrison

Board Regular
Joined
Dec 3, 2013
Messages
107
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
Hello,

I have a code that will activate in a set range where the words "complete" are changed. I would like the active cell to select that row, however only from columns B:AB. All i have found is how to select the entire row.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)If Intersect(Target, Range("Z3:Z602")) Is Nothing Then Exit Sub
If Target = "Completed" Then
    Target.Select
End If
'Select active row from B:AB
End Sub
TIA
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Maybe...

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("Z3:Z602")) Is Nothing And Target.Cells.Count = 1 Then
        Application.EnableEvents = False
        If Target = "Completed" Then Intersect(Target.EntireRow, Columns("B:AB")).Select
        Application.EnableEvents = True
    End If
End Sub
 
Upvote 0
In the thread title you mention that you want to copy, perhaps the following will help you copy the row from B to AB on the "Master" sheet in the next empty row in column A.


Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  If Not Intersect(Target, Range("Z3:Z602")) Is Nothing Then
    If Target.Count > 1 Then Exit Sub
    If Target.Value = "Completed" Then
      Range("B" & Target.Row & ":AB" & Target.Row).Copy Sheets("[COLOR=#0000ff]Master[/COLOR]").Range("A" & Rows.Count).End(xlUp)(2)
    End If
  End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,973
Members
452,540
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top