+ Reply to Thread
Results 1 to 22 of 22

Search and get correspondent positions

  1. #1
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Search and get correspondent positions

    excel-2.jpg
    excel-help-needed.xlsx

    This file has got few cells which are showing "NO", I want to search this grid i.e P1 to AD23, check that where are the "no" cells located and than in cells R31 and S31, want the corresponding values of each "no" cell.

    For e.g:

    For P4 the value is "no" so in R31 I need 1478 and in S31 I need 1912, that are two values of "no" in P4.

    Similarly for next "no" i.e Q3, I need values in next row R32=1478 and S32=2285

    it should continue in rows for each "no", in this file, there are 11 cells with "no" so there should be 11 rows showing 2 corresponding values of each "no".

    Many Thanks.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.
    You are a star it worked great, perfectly as I wanted. Thank you so so much

  4. #4
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Can you make a little change, instead of using two columns, can we show results in 1 column with comma separated values. The result in rows is ok, but instead of using columns R and S, can we use only R and show both the values with comma separation?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    Do you mean like this?

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by JOHN H. DAVIS View Post
    Do you mean like this?

    Please Login or Register  to view this content.
    Perfectly this....thank you thank you thank you so very much

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    You're welcome. Glad to help out and thanks for the feedback.

  8. #8
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Hi

    IS there a way that I can reference it to another sheet, for e.g I have the grid which has got "no" values on Sheet 2 so I need to search "no" on sheet 2 and display results on sheet 1.

  9. #9
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Search and get correspondent positions

    Just change this line of code of @JOHN H. DAVIS

    from

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  10. #10
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by xlbiznes View Post
    Just change this line of code of @JOHN H. DAVIS

    from

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Run-time error: 1004
    Application-defined or object-defined error

  11. #11
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by xlbiznes View Post
    Just change this line of code of @JOHN H. DAVIS

    from

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    When i run it on sheet2, it is working fine but i need results in sheet 1, where it is giving following error:

    Run-time error: 1004
    Application-defined or object-defined error

  12. #12
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Search and get correspondent positions

    This code should be under the sheet1 code window.

  13. #13
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by xlbiznes View Post
    This code should be under the sheet1 code window.
    Yes I tried that on sheet1, it is still showing same error

  14. #14
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    Maybe:

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.
    Thank you so much, working perfect!

  16. #16
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

  17. #17
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.

    Agadir report complete - (DOC 2).xlsm

    In this file I want the result in 'Sheet1' Cell 'A303', I tried putting it but it's showing blank no error, no results :/ can you check please

  18. #18
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    Try:

    Please Login or Register  to view this content.

  19. #19
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by JOHN H. DAVIS View Post
    Try:

    Please Login or Register  to view this content.
    Wow I need to understand this code, how it is working.....thanks a lot John, really thankful to you.

  20. #20
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search and get correspondent positions

    You're welcome. You're previous request was to have the results go too Column R. So it had to be adjusted for that. ie. Sheets("Sheet1").Range("A" & Rows.Count).End(3)(2).Value). It also started the search from Row2 on Sheet2, therefore another adjustment was made to take that into account.

  21. #21
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Quote Originally Posted by JOHN H. DAVIS View Post
    You're welcome. You're previous request was to have the results go too Column R. So it had to be adjusted for that. ie. Sheets("Sheet1").Range("A" & Rows.Count).End(3)(2).Value). It also started the search from Row2 on Sheet2, therefore another adjustment was made to take that into account.
    hmmmm perfect, thanks man, thanks a lot.

  22. #22
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Search and get correspondent positions

    Sorry for getting late, can I limit the results to 15, like the number of "no", if they are above 15, than in my final sheet 1 list, i just get 15 results and not more?

+ 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. Replies: 4
    Last Post: 08-15-2013, 09:50 AM
  2. [SOLVED] Correspondent data matching, Formula IF(COUNTIF)
    By LemitoSanchez in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2013, 05:42 AM
  3. Excel 2007 : Create Correspondent Cells or Something
    By gurskyi in forum Excel General
    Replies: 2
    Last Post: 11-13-2010, 10:20 AM
  4. Look up and adding the correspondent quanties
    By Attila Toth in forum Excel General
    Replies: 4
    Last Post: 01-21-2010, 02:37 PM
  5. Positions of Comments
    By AizA in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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