+ Reply to Thread
Results 1 to 7 of 7

Mapping the data & the getting output

Hybrid View

bala06 Mapping the data & the... 06-04-2011, 05:18 PM
martindwilson Re: Mapping the data & the... 06-04-2011, 05:53 PM
bala06 Re: Mapping the data & the... 06-04-2011, 06:11 PM
alansidman Re: Mapping the data & the... 06-04-2011, 05:54 PM
Richard Buttrey Re: Mapping the data & the... 06-04-2011, 05:57 PM
bala06 Re: Mapping the data & the... 06-04-2011, 06:04 PM
martindwilson Re: Mapping the data & the... 06-04-2011, 06:13 PM
  1. #1
    Registered User
    Join Date
    05-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    53

    Mapping the data & the getting output

    Dear Excel Users

    I would like to get summary of the data from my excel data sheet.

    For example my data looks like this

    1032-hydrogen-bond-frame.dat.c.d.lw 1032-hydrogen-bond-frame.dat.c.d.pw [(4904, 'UNK', 'Z 900B', 51812, 'SPC', 'X8535G', 2432, 'GLN', 'A 179B', 51810, 'SPC', 'X8535G')]
    948-hydrogen-bond-frame.dat.c.d.lw 948-hydrogen-bond-frame.dat.c.d.pw [(4904, 'UNK', 'Z 900B', 51112, 'SPC', 'X8302G', 51113, 'SPC', 'X8302G', 3962, 'ASP', 'A 300B')]
    810-hydrogen-bond-frame.dat.c.d.lw 810-hydrogen-bond-frame.dat.c.d.pw [(4904, 'UNK', 'Z 900B', 26746, 'SPC', 'X 180G', 26747, 'SPC', 'X 180G', 3962, 'ASP', 'A 300B')]
    915-hydrogen-bond-frame.dat.c.d.lw 915-hydrogen-bond-frame.dat.c.d.pw [(4904, 'UNK', 'Z 900B', 29603, 'SPC', 'X1132G', 29602, 'SPC', 'X1132G', 3962, 'ASP', 'A 300B')]
    768-hydrogen-bond-frame.dat.c.d.lw 768-hydrogen-bond-frame.dat.c.d.pw [(47967, 'SPC', 'X7254G', 4947, 'UNK', 'Z 900B', 47969, 'SPC', 'X7254G', 2705, 'TYR', 'A 199B'), (4904, 'UNK', 'Z 900B', 66308, 'SPC', 'X3437G', 66307, 'SPC', 'X3437G', 3963, 'ASP', 'A 300B')]
    920-hydrogen-bond-frame.dat.c.d.lw 920-hydrogen-bond-frame.dat.c.d.pw [(41106, 'SPC', 'X4967G', 4922, 'UNK', 'Z 900B', 41107, 'SPC', 'X4967G', 3841, 'ASN', 'A 293B'), (4904, 'UNK', 'Z 900B', 54491, 'SPC', 'X9428G', 2415, 'HIS', 'A 178B', 54489, 'SPC', 'X9428G')]


    From the above data I would like tp map the number "4904 and the A XXXB" where XXX is any three alphabet. Since the datas are present in different column i'm having great difficult to get the data mapped in output. I'm having huge datas like the above.

    So that the final data should like this

    1032-hydrogen-bond-frame.dat.c.d.lw (4904 A179B)
    948-hydrogen-bond-frame.dat.c.d.lw (4904 A300B)
    810-hydrogen-bond-frame.dat.c.d.lw (4904 A300B)
    951--hydrogen-bond-frame.dat.c.d.lw (4904 A300B)
    768-hydrogen-bond-frame.dat.c.d.lw (4904 A300B)
    920-hydrogen-bond-frame.dat.c.d.lw (4904 A178B)

    I have attached my data for your reference.

    I am not familar with macors programming. Any help is greatly appreciated.

    Many Thanks
    Balaji
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Mapping the data & the getting output

    try
    =LEFT(A1,FIND(" ",A1))&" (4904 "&MID(A1,SEARCH("A????B",A1),6)&")"
    or to get rid of odd space at end
    =LEFT(A1,FIND(" ",A1))&" (4904 "&SUBSTITUTE(MID(A1,SEARCH("A????B",A1),6)&")"," ","")
    Attached Files Attached Files
    Last edited by martindwilson; 06-04-2011 at 06:01 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Mapping the data & the getting output

    Quote Originally Posted by martindwilson View Post
    try
    =LEFT(A1,FIND(" ",A1))&" (4904 "&MID(A1,SEARCH("A????B",A1),6)&")"
    or to get rid of odd space at end
    =LEFT(A1,FIND(" ",A1))&" (4904 "&SUBSTITUTE(MID(A1,SEARCH("A????B",A1),6)&")"," ","")
    Dear Martin

    Thanks a lot

    It works fine.

    Many Thanks
    Balaji

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Mapping the data & the getting output

    Needed a couple of helper columns to make it work.

    See attached.

    Someone else may be able to do with one formula.

    Alan

    Edit: Martin got it. Good Show!
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Mapping the data & the getting output

    Hi,

    When there are more than one "AXXXB" in a cell, like for example the 5th & 6th examples, what determines which one you use? e.g. why A300B in the 5th example and not the earlier 'A199B'

    And why do you mention "XXX" is any three alphabet when clearly the 3 characters are all digits?

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    05-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Mapping the data & the getting output

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    When there are more than one "AXXXB" in a cell, like for example the 5th & 6th examples, what determines which one you use? e.g. why A300B in the 5th example and not the earlier 'A199B'

    And why do you mention "XXX" is any three alphabet when clearly the 3 characters are all digits?

    Regards
    Dear All

    Thanks for reply.

    Richard, there are many "AXXB", for example 5th example data it has "A199B' & "A300B".
    However I want to include the one which accomapined with number 4904.

    768-hydrogen-bond-frame.dat.c.d.lw 768-hydrogen-bond-frame.dat.c.d.pw [(47967, 'SPC', 'X7254G', 4947, 'UNK', 'Z 900B', 47969, 'SPC', 'X7254G', 2705, 'TYR', 'A 199B'), (4904, 'UNK', 'Z 900B', 66308, 'SPC', 'X3437G', 66307, 'SPC', 'X3437G', 3963, 'ASP', 'A 300B')]

    Many Thanks
    Balaji

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Mapping the data & the getting output

    try this instead in case as in row 111

    951-hydrogen-bond-frame.dat.c.d.lw 951-hydrogen-bond-frame.dat.c.d.pw [(41106, 'SPC', 'X4967G', 4922, 'UNK', 'Z 900B', 41107, 'SPC', 'X4967G', 3841, 'ASN', 'A 293B'), (4904, 'UNK', 'Z 900B', 51112, 'SPC', 'X8302G', 51113, 'SPC', 'X8302G', 3962, 'ASP', 'A 300B')]


    =LEFT(A1,FIND(" ",A1))&" (4904 "&SUBSTITUTE(MID(MID(A1,FIND("(4904",A1),255),SEARCH("A????B",MID(A1,FIND("(4904",A1),255)),6)&")"," ","")
    Last edited by martindwilson; 06-04-2011 at 06:15 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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