+ Reply to Thread
Results 1 to 9 of 9

Formula to transfer data from one range of cells to another based on conditions

Hybrid View

  1. #1
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,979

    Re: Formula to transfer data from one range of cells to another based on conditions

    See attached:

    helper column in Q

    =IF(M4<0,B4&COUNTIFS($M$4:M4,"<"&0,$B$4:B4,B4)&IF(C4=1,"070803041110","030407081011"),"")

    to give results in form

    yyyynaabbccddeeff

    yyyy+ year from B

    n=count of "Upsets" (incremented for one in each year)

    aa=column number for data in R

    bb=column number for dat in ss

    etc

    In R! and copy across

    =INT((COLUMNS($R:R)-1)/6)+1

    in R4

    =IFERROR(INDEX($A$4:$K$200,MATCH($O4&R$1&"*",$Q$4:$Q$200,0),MID(INDEX($Q$4:$Q$200,MATCH($O4&R$1&"*",$Q$4:$Q$200,0)),6,2)+0),"")


    Repeated for columns S-U changing highlighted by 2 each time i.e. 8,10,12

    in V4

    =IFERROR(INDEX($A$4:$K$200,MATCH($O5&V$1&"*",$Q$4:$Q$200,0),MID(INDEX($Q$4:$Q$200,MATCH($O5&V$1&"*",$Q$4:$Q$200,0)),14,2)+0),"") & " - " &IFERROR(INDEX($A$4:$K$200,MATCH($O5&U$1&"*",$Q$4:$Q$200,0),MID(INDEX($Q$4:$Q$200,MATCH($O5&U$1&"*",$Q$4:$Q$200,0)),16,2)+0),"")

    Select columns R tot V and copy/paste to next group
    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. [SOLVED] Transfer data to closed workbook based on more conditions
    By Villalobos in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-20-2017, 01:39 PM
  2. Replies: 29
    Last Post: 01-01-2017, 10:25 AM
  3. Transfer data to specific range based on condition
    By khatibcell in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2013, 05:46 AM
  4. Replies: 2
    Last Post: 02-20-2013, 12:40 PM
  5. Replies: 5
    Last Post: 10-15-2012, 06:33 PM
  6. Add cells from a range based on 2 conditions from 2 other ranges
    By Kelly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] Add cells from a range based on 2 conditions from 2 other ranges
    By Kelly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 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