You are here:

Excel/2nd workbook to get data from 1st wb


I have 2 workbooks WB1 & WB2 for input & output respectively & both kept opened.

WB1: Range: A1:E1085476


A   B   C   D   E
1   Date   Name   N1   N2   N3
2   14-Sep-14   ABCD   128.25   138.55   140.29
3   14-Sep-14   ABMN   128.25   138.55   140.29
4   15-Sep-14   ABCD   128.25   138.55   140.29
5   15-Sep-14   ABMN   128.25   138.55   140.29
6   16-Sep-14   ABMN   128.25   138.55   140.29
7   16-Sep-14   XYZAD   128.25   138.55   140.29
8   17-Sep-14   XYZAD   128.25   138.55   140.29

In WB2:
Output required as:


A   B   C   D   E
1   Date   ABCD   N1   N2   N3
2   14-Sep-14   ABCD   128.25   138.55   140.29
3   15-Sep-14   ABCD   128.25   138.55   140.29

Example 2:


A   B   C   D   E
1   Date   ABMN   N1   N2   N3
2   14-Sep-14   ABMN   128.25   138.55   140.29
3   15-Sep-14   ABMN   128.25   138.55   140.29
4   16-Sep-14   ABMN   128.25   138.55   140.29

In B2, I would be manually punching 1 name which is contained in B column of WB1. IF matched;
ANSWER: All related data (related to B2) should appear in A2:A1085476; C2:C1085476; D2:D1085476 & E2:E1085476

VBA required for this.
I am using Excel 2007.
Thanks for the help in advance.

Sorry but this HelpDesk does not format data in a way that makes it abundantly clear what things should look like.

But from what I can discern, you should not VBA to summarize data from one sheet onto another.

If you select the columns A:E and then choose INSERT > PIVOT TABLE
you should be able to construct a pivot report that dynamically shows you the data in the format you've noted.

Put the DATE as the row values, NAME as the FILTER, and N1-N2-N3 as column Values.

If you've never played with a Pivot Report, it will take a wee bit of getting used to, but it will change the way you use Excel forever.  Pivot Tables are one of the most powerful and easy ways to summarize numerical data that exists in Excel.

Good luck.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques:


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: ===================== I have been offering free assistance as an Excel aid on many web sites for many years: ( - JBeaucaire) ======== ( - JBeaucaire) ======= ( - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2017 All rights reserved.