+ Reply to Thread
Results 1 to 5 of 5

Auto transfer data from one work sheet to another

Hybrid View

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Auto transfer data from one work sheet to another

    Hello,

    I am fairly new to using Excel so please be patient with me!

    I am putting together a recruitment log for my company and it requires a lot of information to be included about a lot of young people. I want to collate all this data on a "Master Sheet", but then have individuals information automatically copied to another sheet within the same workbook based upon the "Interest" which they have.

    For example: Joe Blogg's information is all completed on the "Master" sheet. In the "Interest" column "Sport" is selected. I then want all of Joe's information to be copied to the worksheet named "Sport". I would like this to be done for the other options of interest to. Eventually I hope to have a "Master" sheet with all information required, and then several other sheets containing information of those that have the same interests.

    I have attached an example (it is all fabricated for data protection purposes but should highlight what i mean)

    I know it can be done through Macros or VB but as i said, limited knowledge! I appreciate any assistance with this!
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Auto transfer data from one work sheet to another

    Hi, charltonLee,

    did you have a look at the Autofilter or Advanced Filter or have converted the data into a Table (as the list is called from 2007 on)? These three actions offer tho separate data on the original sheet without putting it to other sheets.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    02-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Auto transfer data from one work sheet to another

    HaHoBe,

    I have attempted various ways of using the Advance Filter option, however because my understanding is limited i don't really know what I am doing!

    Using a YouTube video i managed to get the first row of data to copy but then it would not apply to the rest of the worksheet!

    I cannot stress enough how much of a newbie I am at this so apologies if i am being really dumb!

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Auto transfer data from one work sheet to another

    Hi, charltonLee,

    okay, I still believe that you should get the best results without using macros but here we go.

    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button
    Sub SortSplit()
       Dim wks As Worksheet
       Dim iRow As Integer, iRowT As Integer
       Application.ScreenUpdating = False
       Set wks = ActiveSheet
       Range("A1").Sort key1:=Range("A2"), order1:=xlAscending, header:=xlYes
       iRow = 2
       Do Until IsEmpty(wks.Cells(iRow, 1))
          If Left(wks.Cells(iRow, 1), 1) <> Left(wks.Cells(iRow - 1, 1), 1) Then
             Worksheets.Add after:=Worksheets(Worksheets.Count)
             Rows(1).Value = wks.Rows(1).Value
             Rows(1).Font.Bold = True
             Columns(1).Font.Bold = True
             ActiveSheet.Name = Left(wks.Cells(iRow, 1), 1)
             iRowT = 1
          End If
          iRowT = iRowT + 1
          Rows(iRowT).Value = wks.Rows(iRow).Value
          iRow = iRow + 1
       Loop
       Worksheets(1).Select
       Application.ScreenUpdating = True
    End Sub
    This code will sort the active sheet on Column A assuming that row 1 are headers. You would need to adjust the column for sorting as well as for the data to be compared (itīs Column A here). If you have rows that go beyond 32.767 you would need to replace the data type Integer with Long to avoid a run-time error.

    If you have questions please donīt be afraid to ask.

    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    02-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Auto transfer data from one work sheet to another

    Thank you so much! It works!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1