English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Simply put, I want to find and copy information from one sheet to another in Excel using Visual Basic. We have a large Excel database spanning 10-12 Sheets.

On the first sheet, we have two search criteria, say Ford and Mustang. I want to search the other 12 Worksheets and return every Row that has Ford or Mustang in it. The information will go in Worksheet A. The information will go in each successive rom, ala it won't be overwriting the data it found.

Thanks!

2007-03-15 02:57:10 · 4 answers · asked by svanwag 1 in Computers & Internet Programming & Design

Simply put, I want to find and copy information from one sheet to another in Excel using Visual Basic. We have a large Excel database spanning 10-12 Sheets.

On the first sheet, we have two search criteria, say Ford and Mustang. I want to search the other 12 Worksheets and return every Row that has Ford or Mustang in it. The information will go in Worksheet A. The information will go in each successive rom, ala it won't be overwriting the data it found.

More Information: There is a strong desire to automate this process. Many users will be conducting many DIFFERENT searches of this information. Rather them thumb through all 12 pages, we wanted to simplify. Maybe making it easier, "Ford" or "Mustang" (or whatever search Text)would be the only entry in a cell. Thus, you will not have to search through other text in the cell.

Thanks!

2007-03-15 23:51:07 · update #1

4 answers

Copy and paste silly!

2007-03-15 10:49:26 · answer #1 · answered by B.Pillz 2 · 0 2

Since you are dealing with vehicles I can assume your company is using Office Professional. Open Access, create a database, import all the data. Before that, you should consolidate all the data into one sheet. If the rows are too many ie >65000 rows, then you import the data one sheet at a time.
You now have the complete list in Access. Using simple query, extract out all the Ford and Mustangs. Export it back to Excel. The steps are simpler.

2007-03-16 00:36:15 · answer #2 · answered by unnga 6 · 0 1

I can't recommend using a macro for this exercise as you have described it. That's too much work. You can accomplish the same with simple filtering.

Use the default filtering. Click Data, Filter, Autofilter.

With only a dozen sheets to copy, it will be quick and easy to copy the appropriate rows.

Hope this helps!
Kind Regards,
QwertyKPH @ Yahoo!

2007-03-15 21:44:31 · answer #3 · answered by qwertykph 4 · 0 1

You can rather using the Copy and paste in Vblike this:
Sheet1.Range( "A1").Copy
Sheet2.Range( "B1").Paste
You can do this
Sheet2.Range( "B1").Value = Sheet1.Range( "A1").Value
Which is the same as:
Worksheets( "Sheet1").Range( "B1").Value = Worksheets( "Sheet1").Range( "A1").Value

Enjoy my profile, Yes, I am the VBAXLMan

2007-03-18 04:37:11 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers