+ Reply to Thread
Results 1 to 6 of 6

Copy multiple fields based on criteria

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Copy multiple fields based on criteria

    Hi all!

    I need help populating a number of fields from another sheet, based on one criteria.

    The dataset is large and keeps changing, so doing it once manually is not a solution I'm afraid.

    See attached file for a simplified explanation.

    thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Copy multiple fields based on criteria

    You could do this with a long an complicated formula, or you could use a helper column (Red text in the attached) and a simple INDEX/MATCH.

    The results are the same as in your example workbook, but in a slightly different order.
    Was there a reason they were ordered as such in yours?

    BSB
    Attached Files Attached Files

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Copy multiple fields based on criteria

    Here's a formula approach (no helper column). Paste in J5 and copy across+down:
    =IFERROR(LOOKUP(1,0/($D$5:$D$17=$G5)/(COUNTIF($I5:I5,$C$5:$C$17)=0),$C$5:$C$17),"")

    As in post#2, content is the same, but order of output is different from example.

    Please click the Add Reputation star below any helpful posts, and use Thread Tools (up top) to mark your thread as SOLVED once you have your answer. Thanks!-Lee
    Attached Files Attached Files
    Last edited by leelnich; 08-08-2017 at 04:58 AM.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Copy multiple fields based on criteria

    j5=IFERROR(INDEX($C:$C,SMALL(INDEX(($D$5:$D$17<>$G5)*10^10+ROW($D$5:$D$17),0),COLUMNS($J5:J5))),"")
    Try this and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Copy multiple fields based on criteria

    Just for fun, here's an ARRAY FORMULA* which produces alphabetized lists for each row! Paste in J5, copy across and down:

    Please Login or Register  to view this content.
    NOTE- The COLUMNS($J5:J5) clause points to the cell where you paste the formula. If you alter it, be sure to get the $ dollar sign right.

    *Always press CTRL+SHIFT+ENTER to confirm entry after pasting or editing an ARRAY FORMULA in the Formula Bar.
    When copying the formula to other cells, make sure the copied cell is not part of the Paste Area.


    Please click the Add Reputation star below any helpful posts, and use Thread Tools (up top) to mark your thread as SOLVED once you have your answer. Thanks!-Lee
    Last edited by leelnich; 08-08-2017 at 07:13 AM.

  6. #6
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Copy multiple fields based on criteria

    Cheers guys, they worked perfectly!

    Edit: How do I mark this as solved..?
    Edit: Found it!
    Last edited by JonSnow; 08-09-2017 at 04:17 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. [SOLVED] Copy various fields from one workbook to various fields in another by criteria
    By ANDREAAS in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-26-2016, 03:55 PM
  2. Copy value based off multiple cell criteria in a row.
    By this2willpass in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2015, 06:40 PM
  3. How to copy rows based on multiple criteria from one worksheet to another ?
    By Caster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2015, 06:27 AM
  4. Populating fields in multiple cells based on criteria in multiple columns
    By excelalways in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2014, 08:17 AM
  5. [SOLVED] Copy Data from one Sheet to another based on multiple criteria
    By ParisG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2014, 02:53 AM
  6. [SOLVED] Copy Columns based on multiple criteria
    By slmthai in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-19-2013, 02:07 AM
  7. [SOLVED] vba copy and paste based on multiple loop criteria
    By sarahcpa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-19-2013, 10:29 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