+ Reply to Thread
Results 1 to 5 of 5

search name and give cell location

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    greece
    MS-Off Ver
    Excel 2003
    Posts
    9

    search name and give cell location

    i want to make a macro which will search a specific column of a table with names, and will give me the cell location of the name i searched.How can i do that?

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: search name and give cell location

    taspapad,

    You can use the following macro to perform that action. Just change the NameColumn variable to the correct column letter. When run, the macro will ask what name to search for, and then will return the cell address of that name.

    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Registered User
    Join Date
    04-18-2011
    Location
    greece
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: search name and give cell location

    Thank you very much it works perfect!But i have another question...
    How can i put this name in the first empty cell in another column?
    and how can i put in another cell the number of the line the name was found? example: if the name was found in A4 i want to put '4' in another cell...
    Last edited by taspapad; 04-18-2011 at 05:52 PM.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: search name and give cell location

    taspapad,

    To do that, replace these lines of code:
    Please Login or Register  to view this content.


    With this instead:
    Please Login or Register  to view this content.


    Also, at the top of the macro, just underneath the NameColumn, add this line:
    Please Login or Register  to view this content.


    The full code of the modified macro should look like this:
    Please Login or Register  to view this content.



    Hope that helps,
    ~tigeravatar
    Last edited by tigeravatar; 04-18-2011 at 06:21 PM.

  5. #5
    Registered User
    Join Date
    04-18-2011
    Location
    greece
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: search name and give cell location

    It works great but i want to put the name in the first empty cell of a column.this put it in the last line.
    Last edited by taspapad; 04-19-2011 at 03:16 AM.

+ 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