+ Reply to Thread
Results 1 to 22 of 22

retrieve row data

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    retrieve row data

    i have one sheet


    serial no. data1 data2 data3 data4
    1 asd asd asd asdf
    2 sef *** dfgdgf asdf
    3 dasdf dsfd sadfs sdfsdf
    4 dsfds dsfsad sdfsa ssf
    5 gfdg dgfsd sdgfdsa were

    when i click on serial it shows me the row data on other sheet

    for example
    if i click on 2

    serial no. data1 data2 data3 data4
    2 sef dfgdgf asdf

    it show row2 data on other sheet

    i also attached the file with this thread


    Solved with this

    Quote Originally Posted by JBeaucaire View Post
    Like so:
    Please Login or Register  to view this content.


    OK, now it's your turn. If your "requirements" change again you take a stab at changing the code given to match your new requirement and then ask us about your code and your attempts, OK?
    Attached Files Attached Files
    Last edited by ualtaf; 11-01-2010 at 08:11 AM. Reason: Solved

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    http://www.excelforum.com/excel-new-...-in-excel.html

    Please don't post the same question multiple times, stick with one thread.

    Since this post got the sample file, I'll respond here, but the answer is the same. VLOOKUP() does this. I put this in C5 and copied down/across as needed.

    =IF($B5 = "", "", VLOOKUP($B5, Sheet1!$B:$F, COLUMN(B1), 0))
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Row Data Extraction

    We need more info than that, how do you want it displaying? is sheet 2 empty? if not where should it display?, should the data in sheet 2 change if another cell is clicked?, what if a cell with no data is chosen?

    Why not attach a sample workbook?




    Microsoft Office Help - Excel VBA Programming
    Not all forums are the same - seek and you shall find

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Row Data Extraction

    Is this what you mean?

    In the worksheet module for Sheet 1
    Please Login or Register  to view this content.

    Click on a serial number to see the result.

    Simon
    The OP did attach a workbook it has dissapeared and I cannot attach the file in this post.

    See the .jpg attached, taken from IE recovery

    [EDIT]
    Success attaching file on the third attempt
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Marcol; 10-26-2010 at 10:15 AM. Reason: Added .jpg as proof
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: retrieve row data

    maybe, i've named your data as lookup_table
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Row Data Extraction

    Quote Originally Posted by Simon Lloyd View Post
    We need more info than that, how do you want it displaying? is sheet 2 empty? if not where should it display?, should the data in sheet 2 change if another cell is clicked?, what if a cell with no data is chosen?

    Why not attach a sample workbook?




    Microsoft Office Help - Excel VBA Programming
    i want yo display in the column form. yes the sheet 2 is empty, yes the data should change if another cell is clicked. every cell must have a data that is sure
    i attached the sample workbook
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    Quote Originally Posted by JBeaucaire View Post
    http://www.excelforum.com/excel-new-...-in-excel.html

    Please don't post the same question multiple times, stick with one thread.

    Since this post got the sample file, I'll respond here, but the answer is the same. VLOOKUP() does this. I put this in C5 and copied down/across as needed.

    =IF($B5 = "", "", VLOOKUP($B5, Sheet1!$B:$F, COLUMN(B1), 0))
    thanx JBeaucaire
    it is little bit making sense for me , can u help me how i can use vlookup for click
    for example if i click on serial number cell it automatically shows that row data on other sheet.. can u plz help me more on this?

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    I've already shown how to do it without a click. Your sample sheet listed a requirement that I showed how to solve. You'll have to demonstrate how you mean if not that.

  9. #9
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    Quote Originally Posted by JBeaucaire View Post
    I've already shown how to do it without a click. Your sample sheet listed a requirement that I showed how to solve. You'll have to demonstrate how you mean if not that.
    here i attached my exact requirement file
    on sheet1 when i cllick on "2" it shows the corresponding record or row of "2" on sheet2, as mentioned in the test file
    this is my exact requirement.. please help me regarding this....
    Attached Files Attached Files

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    1) Right-click on the Sheet1 tab and select View Code

    2) Paste in this event macro:

    Please Login or Register  to view this content.

    3) Close the editor and save your workbook as a macro-enabled .xlsm file

    4) Now anytime you double-click on a cell in column B, the row will be transferred to sheet2 in the next empty row.

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    Is this the correct solution or not? It appears you're trying to start new threads for the same question. If this is not the correct solution, respond here in this thread.

  12. #12
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    no this is not the correct solution i was searching for

    becaz that transfer the row in next empty row
    the solution i want is to update the same row and only one row will be shown in sheet2 which is clicked in sheet1
    another thing it is not automatically shown the sheet2 on click and it is working on double click not on single.......

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    Try this instead.
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    this problem is partially solved

    the remaining part is that this do not directly open the sheet2.....

    if i want to show the data according to my requirement in sheet2, than?
    for example this show the data in row form

    but what if i want to show this in column form or in two columns as shown in attachment test file
    Attached Files Attached Files

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

    Re: retrieve row data

    see attached uses index match
    hmm i just noticed this was not a new thread and i never read any of the above! so this may be a complete waste of space
    Attached Files Attached Files
    Last edited by martindwilson; 10-30-2010 at 08:23 AM.
    "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

  16. #16
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    Like so:
    Please Login or Register  to view this content.


    OK, now it's your turn. If your "requirements" change again you take a stab at changing the code given to match your new requirement and then ask us about your code and your attempts, OK?

  17. #17
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    Quote Originally Posted by martindwilson View Post
    see attached uses index match
    hmm i just noticed this was not a new thread and i never read any of the above! so this may be a complete waste of space
    index doing the same thing what i have done with vlookup.....

    please tell me, can we use vlookup and hyperlink together for the purpose i explained above???
    please guide me

  18. #18
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    Not to click on Sheet1 and have things appear on sheet2, that requires VBA.

    You could use VLOOKUP on sheet2 if you used a selection criteria of some kind in C7...like a drop down. With a manual selection in C7, the rest of the cells could do a vlookup, though INDEX/MATCH is a better choice.

  19. #19
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    Quote Originally Posted by JBeaucaire View Post
    Like so:
    Please Login or Register  to view this content.


    OK, now it's your turn. If your "requirements" change again you take a stab at changing the code given to match your new requirement and then ask us about your code and your attempts, OK?

    Solved My problem

    Thank You , thank You very much....how can i make this post solved

  20. #20
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: retrieve row data

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

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

    Re: retrieve row data

    grief that was hard, sorry i muddied the waters lol

  22. #22
    Registered User
    Join Date
    10-26-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: retrieve row data

    Quote Originally Posted by martindwilson View Post
    grief that was hard, sorry i muddied the waters lol
    its ok martin no need to say sorry

    actually that code solved my problem through VBA

+ 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