+ Reply to Thread
Results 1 to 6 of 6

Copy data from one sheet to another based on a certain criteria

  1. #1
    Forum Contributor
    Join Date
    01-13-2016
    Location
    Sheffield, England
    MS-Off Ver
    2016
    Posts
    216

    Copy data from one sheet to another based on a certain criteria

    Hi,
    I have a workbook with several tabs within it.
    I am wanting to copy into the tab 'Stafforce' the name, surname and hours from the 'Fire Reg' tab.
    The criteria that has to be met is the clock/jw no matching the same number in the 'stafforce' tab. The relevant hours to be in the relevant days against the relevant name.
    I hope this makes sense. I have put a link to my workbook if that helps.
    Thanks in advance for any help.

    https://www.dropbox.com/s/d60ozbk1yy...2023.xlsx?dl=0

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,806

    Re: Copy data from one sheet to another based on a certain criteria

    Many people are reluctant to download files from a third-party site, but you can attach a sample Excel workbook directly to one of your posts in this forum.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Pete

  3. #3
    Forum Contributor
    Join Date
    01-13-2016
    Location
    Sheffield, England
    MS-Off Ver
    2016
    Posts
    216

    Re: Copy data from one sheet to another based on a certain criteria

    Hope this has worked. i have attached a sample workbook.
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,806

    Re: Copy data from one sheet to another based on a certain criteria

    You can put this formula in B4 of the Stafforce sheet:

    =IFERROR(INDEX('Fire Register'!B:B,MATCH($A4,'Fire Register'!$D:$D,0)),"")

    and copy across into C4:D4.

    Then you can amend the formula in D4 to this:

    =IFERROR(INDEX('Fire Register'!G:G,MATCH($A4,'Fire Register'!$D:$D,0)),"")

    You can copy this across to J4, but you wil need to amend the column where you want to bring the data from in each cell, i.e. the G:G part (in red above) should reflect that you want to get the data from alternate columns, so change it in turn to I:I, K:K, M:M, and so on.

    Then you can copy that row of formulae down.

    Hope this helps.

    Pete

    P.S. Column S on the Fire Register sheet appears to be formatted as Text, so you should change this to Number with 2dp before you enter any data into it.

  5. #5
    Forum Contributor
    Join Date
    01-13-2016
    Location
    Sheffield, England
    MS-Off Ver
    2016
    Posts
    216

    Re: Copy data from one sheet to another based on a certain criteria

    Thank you Pete. That has done exactly what I wanted it to do.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,806

    Re: Copy data from one sheet to another based on a certain criteria

    Glad to hear it, and happy to help.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy data from one sheet to another based on a certain criteria
    By shina67 in forum Excel General
    Replies: 5
    Last Post: 05-17-2016, 02:58 PM
  2. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  3. [SOLVED] Consolidated Summary Sheet - Copy data from one sheet to other based on criteria
    By sabha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-21-2015, 03:29 AM
  4. VBA Copy data based on set criteria into new sheet
    By indik in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2015, 11:58 AM
  5. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  6. Replies: 4
    Last Post: 07-24-2012, 07:09 AM
  7. Copy data from a sheet to other based on a criteria
    By arun88aries in forum Excel General
    Replies: 5
    Last Post: 02-22-2011, 06:13 AM

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