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?
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?
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
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.
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks