+ Reply to Thread
Results 1 to 6 of 6

Get specific data and copy particular fields to another sheet

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    17

    Get specific data and copy particular fields to another sheet

    I want to check one particular column for a particular value, if it equals that value I'd then like to copy particular columns from that row onto another sheet, then move on and look for the next one that satisfies the same criteria.

    Once it has found all of them and copied them, I'd then like it to go back through the same data and look for a second criteria and do the same thing.

    On sheet 1 there are 6 columns (A through F) and I want to check if F = 1, if it does I would like to copy the contents of columns A, B, D, F of the same row to sheet 2 starting from A22 and continue through until I have found each row where F = 1

    Once that is done I'd like it to go through the same data on sheet 1 and look for where F = 2 and copy the same columns A, B, D, F contiuing on from the next row of sheet 2 where the last data was copied to.

    I have attached an example speadsheet.

    Thanks in advance for any help.
    Attached Files Attached Files
    Last edited by Moedeb27; 03-23-2017 at 09:17 PM. Reason: Solved

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Get specific data and copy particular fields to another sheet

    How did you get your ranking?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    08-01-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Get specific data and copy particular fields to another sheet

    The ranking is an internal number and is always 1 or 2 that I am looking for

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Get specific data and copy particular fields to another sheet

    First option would be filter on the rank.

    Here is your second option Array formula ( CTRL + SHIFT + ENTER )
    In Sheet2 -> A2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    drag right and down... delete the unwanted columns.

    Edit: I Forget to wrap the formula above with iferror() for error handling. =iferror(theformula above,"")
    Last edited by vlady; 03-22-2017 at 10:53 PM.

  5. #5
    Registered User
    Join Date
    08-01-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Get specific data and copy particular fields to another sheet

    Nope doesn't work - the A2 - D2 row shows a #N/A and all other rows / cells show #NUM!

    My preference for this would be to have a button the a user can press to run the macro that checks and adds the data.

    I would also point out that whilst the example only has 8 rows it changes each month and could be 1 row or 20 changes monthly

    I also obviously only want to display rows where the rank is 1 then 2, no blank rows.

  6. #6
    Registered User
    Join Date
    08-01-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    17

    Re: Get specific data and copy particular fields to another sheet

    I have actually managed to fix this for myself and thought I would show the answer for anyone else looking for something similar.

    I did change one of the criteria slightly however and removed the columns that had data I didn't want in it, so I didn't have to choose specific columns to copy, just the row from column A to D for example

    I did it through adding a button to the worksheet and adding a module in VB - The solution example is attached


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Moedeb27; 03-23-2017 at 09:19 PM.

+ 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. Replies: 0
    Last Post: 09-16-2015, 01:18 PM
  2. Auto copy specific data from sheet to antoher sheet under few condition
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2014, 04:47 AM
  3. [SOLVED] Macro to copy date to specific sheet based on data from another sheet.
    By RichTea88 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-09-2013, 11:28 AM
  4. [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
  5. Replies: 0
    Last Post: 09-17-2012, 11:10 AM
  6. Replies: 4
    Last Post: 08-02-2012, 12:48 PM
  7. Copy Excel data to Word fields and retain fields
    By GCW esq in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-06-2012, 10:31 AM

Tags for this Thread

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