Copying specific data to another sheet based on cell value

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
36,114
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Juddman79

New Member
Joined
Feb 17, 2020
Messages
16
Office Version
2016
Platform
Windows
I think this is similar to what I'm trying to achieve with 2 sheets.

I have two sheets (tracker - sheet 1 and sessions - sheet 2) and I would like to copy Columns B, C, G from sheet 1 to Columns A, B, C respectively in sheet 2 once the cell data is filled in sheet 1 and the location in Column a is equal to Aberdeen. I don't specifically need the location to copy over to sheet 2 but if that makes things a bit simpler then its not an issue. The data would need to go to the next available free row in sheet 2

Sheet 1
Column A - Location
Column B - Surname
Column C - First Name
Column G - Worker

Sheet 2
Column A - Surname
Column B - First Name
Column C - Worker

In sheet 1 I have the following code already running to sort the data if this makes a difference to the above request:

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  If Not Intersect(Target, Range("A:A, F:F")) Is Nothing Then
    If Target.CountLarge > 1 Then Exit Sub
    If Range("A" & Target.Row) <> "" And Range("F" & Target.Row) <> "" Then
      Range("A2:X101" & Range("A" & Rows.Count).End(3).Row).Sort _
        key1:=Range("A2"), order1:=xlAscending, key2:=Range("F2"), order2:=xlAscending, Header:=xlYes
    End If
  End If
End Sub
Many thanks in advance if you are able to assist.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
36,114
Office Version
365
Platform
Windows
Please start a thread of your own, rather than posting to an old thread.
Thanks
 

Watch MrExcel Video

Forum statistics

Threads
1,090,426
Messages
5,414,395
Members
403,526
Latest member
swedeness50

This Week's Hot Topics

Top