+ Reply to Thread
Results 1 to 14 of 14

Extracting and arranging data

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Extracting and arranging data

    Hi,

    I have a list of data in 'Data' sheet.I want to get the result as mentioned in 'Expected Result' worksheet.Data mentioned in enclosed attachment are self explanatory.

    Hoping a positive response in this regard.
    Attached Files Attached Files

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

    Re: Extracting and arranging data

    At sheet Data
    Insert Row 1 for the header row
    Name, Type, Code, Amount at E1:H1

    E2
    =LEFT(B2,FIND(F2,B2)-2)

    F2
    =TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B2,")",),"(",),"[",),"]",)," ",REPT(" ",9)),9))

    then Insert Pivot table, just drag and drop
    Name to Rows
    Code , Type to Columns
    Amount to Values


    Or Formula at Expected Result C3:H7

    =SUMIFS(Data!$H$2:$H$16,Data!$B$2:$B$16,$B3&"*",Data!$F$2:$F$16,"*"&C$2&"*",Data!$G$2:$G$16,LOOKUP("z",$C$1:C$1))
    Attached Files Attached Files
    Last edited by Bo_Ry; 04-21-2021 at 05:24 AM. Reason: Add formula at C3:H7

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting and arranging data

    In C3 then copied across
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

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

    Re: Extracting and arranging data

    IF (and it is a very big IF)... the formula in BLUE (C3, copied down) works for you, then this is a helper-free 3-formula solution that delivers everything. Also, IF it works, the formula in BLUE will be an array formula.

    IF it works (change one of the names in raw data B1 to B15 to check), then I will need to do a little more tidying up to make it a bit more dynamic... but I am not confident that it will work in your Excel version. For me, it looks good.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Extracting and arranging data

    Thanx for the response.

    As per your post#4 attachment ,plz refer B15 data which is in braces(Gratuity) which is also to be pulled in row 2 of 'Expected Result' worksheet.This means that everything which is either in () or[ ] must be reflected in row 2 which has been manually mentioned.Rest seems to be fine.

    Plz note that this is only sample data,in actual I have data at least 4200.
    Plz do necessary tidying up to make up more dynamic in large data for 4200 rows.
    Last edited by paradise2sr; 04-21-2021 at 10:15 PM.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Extracting and arranging data

    Suppose every name set of 3 contiguous rows
    Salary = Salary
    GT=Gt or gt or Gratuity
    PF=Pf or pf or pF
    In C3:

    Please Login or Register  to view this content.
    Drag down and accross
    Attached Files Attached Files
    Quang PT

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting and arranging data

    Have you seen post #3

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

    Re: Extracting and arranging data

    1. 3 Named ranges for Primary data, Names, Codes & amounts, all variants of this:

    =Data!$B$1:INDEX(Data!$B:$B,MATCH("zzzz",Data!$B:$B))

    These will auto-adjust the ranges to suit your data.


    2. 1 Named Range to return the name portions from the name/payment composite:

    =IFERROR(IFERROR(LEFT(Names,SEARCH("[",Names)-1),LEFT(Names,SEARCH("(",Names)-1)),"")



    3. Array formula to return names, C2, copied down:

    =IFERROR(INDEX(List,MATCH(1,INDEX(--ISNA(MATCH(List,C$2:C2,)),),)),"")


    4. Formula to return codes in D1, copied across:

    =IFERROR(INDEX(Codes,MATCH(1,INDEX(--ISNA(MATCH(Codes,$A$1:A1,)),),)),"")



    5. Formula in D3 to do the maths, copied across and down:

    =IF($C3="","",SUMPRODUCT(--(ISNUMBER(SEARCH($C3,Names))*--(ISNUMBER(SEARCH(D$2,Names))*(Codes=D$1)*Amounts))))


    Refer to the file.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Extracting and arranging data

    Sorry for the delay reply.Post#8 Total doesn't matches from other sheet.It is due to the word 'GT' and 'Gratuity' as both are same.

    If alphabetically arranged would be highly appreciated.

  10. #10
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Extracting and arranging data

    Quote Originally Posted by kvsrinivasamurthy View Post
    Have you seen post #3
    The list cannot be made manually as I have large data more than 4000 rows in a column,might be duplicate,triplicate,etc.Also Total from Data sheet should be perfectly matched with alphabetically arranged if possible.

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting and arranging data

    Helper column C used. In C1 then copy down

    Please Login or Register  to view this content.
    In B3 then copy down

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 04-29-2021 at 03:27 AM.

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting and arranging data

    Here in B3 and copy down for sorted list in

    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting and arranging data

    Pl see file.
    Helper columns C and D are used. It can changed and suitably formulas should be edited.
    Names are sorted.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Extracting and arranging data

    Thanx all of u .

+ 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. re-arranging data
    By asrivera in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 12-10-2019, 03:52 AM
  2. Need help with data arranging
    By eqeq.eq in forum Excel General
    Replies: 2
    Last Post: 05-25-2019, 01:16 PM
  3. Replies: 8
    Last Post: 01-02-2019, 04:55 AM
  4. [SOLVED] Arranging Data
    By QSAlan in forum Excel General
    Replies: 9
    Last Post: 11-19-2018, 01:33 AM
  5. data arranging
    By deepak.kec in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2008, 05:08 AM
  6. [SOLVED] re-arranging the data
    By Lan in forum Excel General
    Replies: 2
    Last Post: 08-16-2006, 11:55 AM
  7. Arranging data
    By Petterq in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2005, 03:05 PM

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