+ Reply to Thread
Results 1 to 2 of 2

Formula to copy data based on criteria

Hybrid View

  1. #1
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Formula to copy data based on criteria

    My brain hurts this morning. I've been trawling the web and can't see a solution for a relatively simple criterion-based copy/paste. The spreadsheet shows clearly the source data, the criteria used and the desired end result.

    In short, if I want to select data in cells in one column, if the values in another column meet a criterion and copy the selected values to another location.

    Can you help me (again...)??
    Attached Files Attached Files

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

    Re: Formula to copy data based on criteria

    See attached file. I've used this formula in F5:

    Formula: copy to clipboard
    =IF(A5="","-",A5&"_"&COUNTIF(A$5:A5,A5))


    which is copied down the column beyond your data (the hyphens show how far). Then I've set your table up in columns N to Q (in blue), with this formula in N18:

    Formula: copy to clipboard
    =ROWS($1:1)


    and this one in O18:

    Formula: copy to clipboard
    =IFERROR(INDEX($D:$D,MATCH(O$17&"_"&$N18,$F:$F,0)),"")


    which is copied across to Q18. Copy N18:Q18 down as far as you need to.

    Hope this helps.

    Pete
    Attached Files Attached Files

+ 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. Copy data into a template based on criteria
    By chandrsl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2013, 07:47 PM
  2. Copy data from one tab to other tab based on criteria
    By bombiro in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2013, 01:26 PM
  3. Copy and Paste data based on two criteria being met
    By btxp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2013, 02:24 PM
  4. copy formula in cell based on criteria in other worksheet
    By knufjes in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2008, 06:26 AM
  5. [SOLVED] Macro or formula to copy data based on criteria
    By MT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-05-2005, 10:03 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