Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Getting Data from One Excel Workbook to Another WorkBook

0

I want to get the data with same field names from one excel work book to another workbook. Daily I'm using vlookup to get the data. So please tell me the shortcut from getting data from one work book to another work book.

Answer
Discuss

Answers

0
Selected Answer

There is no "shortcut". Consider using VBA. VBA can learn to do what you do and then do it repetitively.

Therefore you would use your present source workbook and your present destination workbook and then write code to transfer the data. That is simple copy and paste. Record a macro and VBA will give you the code on the spot.

In the next step you will need to review the code the recorder has written. There are two steps to this.

  1. Remove all Select and Activate statements the recorder needs (but you don't). For this you will need to learn to handle elementary VBA objects such as a Workbook, and Worksheet and a Range.
  2. Replace all hard references with generic ones. For example, when the recorder says "Copy from row 3 and paste to row 17 in the other sheet" you will have to amend this to say "copy from the row following the last row I copied from and paste below the last row of the other sheet".

Some people buy a book. Some take hands-on courses such as offered on this site. But most of the information you need is available for free on the Internet. All you have to do is learn how to search for what you need and then put it all together.

Once you have started programming you will meet situations where you don't know how to proceed. At that point forums like this can be useful. When you reach that stage, avoid being tagged as the guy who wants others to do his work for him and call it "help". There are plenty of people who want to help but nobody wants to be taken advantage of. Therefore always prepare your question very well. A good question can be answered in one sentence. A bad one often has no answer.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login