View Single Post
  #2  
Old April 21st, 2010, 12:48 PM posted to microsoft.public.excel.worksheet.functions
Roger Govier[_8_]
external usenet poster
 
Posts: 338
Default Pulling/Collating Data from Workbooks

Hi Chris

Whilst it is possible to do what you want, by writing VBA code, I would
urge you to reconsider your recording structure.
You would be much better served by having all data for all people for
all days of the year in one single spreadsheet.
It would then be a simple process with either Autofilter or Advanced
Filter to produce a report for any employee for any tine period, without
having to have 30 separate workbooks.

I am assuming that you have fewer than 300 entries per month for each
employee if you are using XL2003 as 300 x 12 months x 18 employees would
be 64,800 rows of data.

If you had XL2007, then it would not matter if you had 4,500 or so
entries per employee per month

Let us assume that all of your data is in columns A to G at present.
In column H enter the heading DATE in H1 and in H2 onward the date that
BOB or JIM did the work in your regional format (here in the UK it would
21/04/2010). From a data entry viewpoint, typing Control + ; will
automatically insert today's date into a cell.
In column I enter MONTH in I1 and in I2 enter
=IF(H2="","",TEXT(H2,"mmm"))
and copy down.

Now, highlight A1:H1DataFilterAutofilter and this will apply dropdown
arrows on each of those cells.
When you want a report, click the dropdown on column G and Select BOB,
and then click the dropdown on column I and select Apr ( or any other
month you want).

If you wanted the report on a different sheet, then you could use
Advanced Filter plus a tiny piece of VBA code, to allow you to enter a
Name and a Month, and all of the relevant data would be pulled across to
your report sheet.

Post back if you need more help


--
Regards
Roger Govier

chrisk wrote:
Hi,
I have a workbook with 31 sheets a diary called April for this month
AX to FX is the info I want relating to the employee's initials in the G
column of the diary
There are multiple entries for the employee so he may reappear in row 9, 13
and 15 in column G of the diary

I want to pull all the lines that relate to that employee from the 31 sheets
of the Diary workbook called April for this month into a separate workbook
called BOB (employees name) and BOB, his name, is the reference in the diary
in column G (also in other cells if Bob does more than one job per day) but
in the G column.
There is only one sheet in BOB called Sheet1

There is a workbook for each month with 30/31 days (Feb with 28/29)

So I want to search the 30 worksheets (named 1 to 30) of the Diary (April)
for Bob in the G column
Then pull the data from columns A to F that relate to the row that Bob
appears in and put it in the separate workbook called BOB
There are the other 18 employees that I want to do the same with who also
populate the G column of the same Diary and who also have their own separate
workbook.

Thanks