+ Reply to Thread
Results 1 to 4 of 4

Trim data to all one row from adjacent rows .

  1. #1
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    450

    Cool Trim data to all one row from adjacent rows .

    Hello all ,

    In this sheet I am trying to get data from 3 x rows (all rows adjacent to each other) that will give me the results I have in col O .

    Of the eight results I need from cols G to N , I have already adapted 4 x of them with working functions thanks to people from here .
    So cols G , H , K and L are resulting for me . Filtering col O shows the results I have filled in manually , this should be what rows will look like after repairs .

    Some points of interest which will help in this task are .

    The data after I have cleaned it up will always be in this same format .
    The horse names appear twice , so either could be used but I am using the one with tab# (always left of a full stop) and barrier (to the right of name always in brackets) .

    The jockeys name always has a letter J next to it to the left .
    The trainers name always has a letter T next to it to the left .
    The claim if there is one will be to the very right of the name (in brackets) , example (a1) , (a3) , (a0.5) . The brackets and letter (a) not needed .

    Col N result I can do with minus col M from col L .

    I have tried to adapt other trim type functions but never give a whole correct result .
    Thanks .
    Attached Files Attached Files
    I am grateful for all answers to my questions .
    Also i give a reputation even if not answered .

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Trim data to all one row from adjacent rows .

    Please try at

    G2
    =IF(H2="","",--LEFT(SUBSTITUTE(INDEX($D$2:$D$99,MATCH(H2,$D$2:$D$99,)+1),"."," "),2))

    H2
    =IFERROR(INDEX($D$2:$D$99,AGGREGATE(15,6,ROW($D$2:$D$99)/ISNUMBER(FIND(CHAR(160),$D$2:$D$99)),ROWS(H$2:H2))-2),"")

    I2:J2
    =IF($H2="","",TRIM(MID(SUBSTITUTE(INDEX($D$2:$D$99,MATCH($H2,$D$2:$D$99,)+COLUMNS($H2:I2)),"(",REPT(" ",99)),2,99)))

    K2:L2
    =IF($H2="","",-MID(SUBSTITUTE(INDEX($D$2:$D$99,MATCH($H2,$D$2:$D$99,)+COLUMNS($K2:K2)),"(",REPT(" ",99)&"("),99,99))
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    450

    Re: Trim data to all one row from adjacent rows .

    Wow , just give me a second while I get off the floor again from you answers ,results ,post .
    Astounding in a good way is all I can say .

    I entered another 99 pieces of data totally different and result again perfect . I lose the race number but that's insignificant .

    My question is I supplied only 2 x races as a sample sheet , I checked yesterdays meetings in New Zealand and I see there would of been 700 rows to process .

    Will the functions still work if I changed all of them to say 2000 from 99 . Alternatively my second question is would I have to put in correct 700 where 99 is . Just trying to predict future sheet row sizes .
    Thanks ,

  4. #4
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    450

    Re: Trim data to all one row from adjacent rows .

    Thanks Bo_Ry , this has made things a lot easier .
    Thank you .

+ 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] Duplicate Data in Rows grouped with adjacent data transposed into Column
    By KBarnard01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-22-2020, 10:23 AM
  2. [SOLVED] formula to adjust data from different rows in one row adjacent to each other
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2019, 05:02 AM
  3. Move Data from rows to adjacent rows if having unique value
    By pintu2222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2017, 09:35 AM
  4. Centering data in one column between two adjacent rows
    By gallagt01 in forum Excel General
    Replies: 5
    Last Post: 04-18-2017, 11:12 AM
  5. [SOLVED] Extract data from merged cells in adjacent rows
    By hoss88 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2016, 03:09 PM
  6. Macro that cuts data from lower rows and pastes them in adjacent rows
    By kehl_4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2014, 02:07 PM
  7. Replies: 6
    Last Post: 10-21-2010, 03:39 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