+ Reply to Thread
Results 1 to 9 of 9

Search a value in Column A and print other column values of the same row in other sheet

  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    14

    Search a value in Column A and print other column values of the same row in other sheet

    Hi All,

    I am a novice with using VBA code and trying to find a solution for my work since past one week. And the problem, to search a value in Coulmn A of Sheet1 and print the value of the another column of the corresponding row in another sheet say Sheet2. Note that the value appears more than one time in the coulmn A and required to print all the corrsponding column values in sheet2.

    Ex: A B C
    1R 3R 4T
    2R R5 45
    1R 4T R4
    1C 4R T6
    1R 5T 45R
    2R 4R 4R
    1C 3R 3E

    If i the search value is 1R then the result in other sheet would be like

    3R 4T
    4T R4
    5T 45R

    Thanks for your help in advance.

    Regards,
    Naveen
    Last edited by navn; 05-29-2012 at 03:25 AM.

  2. #2
    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: Search a value in Column A and print other column values of the same row in other shee

    Hi, and welcome to the forum.

    You don't necessarily need a macro. Standard Data Filtering will identify the results you want. Either by filtering the list in place or by copying the required filtered records to another sheet.

    If you do want a macro then just adopt the approach above and code it. Try using the macro recorder for starters and then adjust it as necessary if the original data varies.
    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.

  3. #3
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search a value in Column A and print other column values of the same row in other shee

    Hi

    Do you still want a macro for this.. or is the prob solved?
    Click *, if my suggestion helps you. Have a good day!!

  4. #4
    Registered User
    Join Date
    05-29-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Search a value in Column A and print other column values of the same row in other shee

    Thanks Richard, my sheet updated regularly by one remote user and others will only have access to view the Sheet2 page where they provide the search value, but not have access to update or view the Sheet1 data. I have done this through formulas but as the days rolling on the data gets increased, which in turn slow down the page while opening.

    So i have started leaning VBA and written some code, but not much familiar with the Arrays. Hence, i landed up here. Hope you understand my problem and why i am interested in looking for VBA help in this regards.

    Thanks once again for your speedy response.

    Regards,
    Naveen T

  5. #5
    Registered User
    Join Date
    05-29-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Search a value in Column A and print other column values of the same row in other shee

    Nope, Jraj1106 i still need help with VBA code.

  6. #6
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search a value in Column A and print other column values of the same row in other shee

    OK.. then just tell me : everytime you search for a value from col A, do you want the sheet2 to be cleared ie. do you want the previous data to be deleted and the fresh search data to be displayed?
    Do clear how you want the macro operation to be carried out.....

  7. #7
    Registered User
    Join Date
    05-29-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Search a value in Column A and print other column values of the same row in other shee

    Yes, exactly with every new search the previous data to be cleared and displayed with new search result.

    As soon as i entered the new search value and enter the result set has to be displayed.

    Regards,
    Naveen

  8. #8
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search a value in Column A and print other column values of the same row in other shee

    OK then... check this out:

    navn.xlsm

  9. #9
    Registered User
    Join Date
    05-29-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Search a value in Column A and print other column values of the same row in other shee

    Awesome Jraj1106, really excellent stuff....................bunch of thanks.

+ 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