Excel Macro VBA -


i new vba , excel macros.

i create command button asks user input if searching policy or procedure or form. ask user search words. result of search appear list on first worksheet.

the excel spreadsheet has 9 worksheets. first worksheet introduction search feature. remaining 8 worksheets contain data 2 columns. first column name of policy, procedure or form. second column type of document (i.e. policy, procedure or form). # of rows each type of document vary between worksheets defined cell range different each worksheet each type of document.

i'm going assume you, many people, confused on how start, , not trying use site free macro repository.

with in mind, i'm going give links , tools yourself. discuss type of vba use solve have terms available up.

first , foremost, need command button. easiest way use developer tab on ribbon. can learn here. once button, you'll need assign macro it. more info on here. suggest form control button bit easier , can handle task fine.

before can assign macro, though, need build macro. excel-easy show how vba editor through gui, or press alt+f11.

first, want input box. information on can found @ msdn. article has examples running.

you'll want assign input variable these @ ozgrid. based on description, i'd want string.

now, you'll want for each...next loop. this:

for each worksheet in thisworkbook.worksheets     'more code here next worksheet 

for that, you'll want learn worksheet, thisworkbook, , worksheets.

inside of loop, you'll need find last row of each worksheet. common thing when working excel , can found many places, such the spreadsheet guru. once you've done that, you'll want define range using last row. last link should there, too.

once you've got range, it's time use find method. first example on page you're going do. you'll using variable set input earlier instead of number 2, , won't need replace it. uses with statement, if statement (article @ tech on net), do while loop, , not operator.

now, each time find it, want move it. make sure don't paste relevant info on each other, you'll want set last row first page now. can use value property , move data first sheet. sure add 1 last row when transfer value or transfer last row instead of next row beneath it.

good luck!

note: mentioned of sites got these links from. these pretty references. more references, here. also, google friend ;). if have particularly hard time section of this, can post new question specific problem.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -