Help creating a report

towners

Board Regular
Joined
Mar 12, 2009
Messages
222
Office Version
  1. 365
Platform
  1. Windows
Hi

I need to create a daily rport for a morning meeting from an excel table that hold my productivity data for a number of production lines.

I was thinking of having the user enter a date into cell C1 of the report, then hitting a macro that collected the data for that date and pasted it into another table. (I've shown the client pivot tables but they want a specific report printed).

I'm thinking along the lines of:

collect the date
find the first occurrence of the date in my sorted table [firstdate]
find the last occurrence [lastdate]
copy the data from the relevant rows and paste

Can anyone help me with the method and code for my macro?

Many thanks

Paul
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
We can write a macro to do this fairly easily.

However we know more about your data. It also may turn out easier to use formulas if you are consolidating the data into a report.

1. Whats the layout of the data you are taking from
2. Whats the layout of the report you want it in
 
Upvote 0
Hi, thanks for the response.

My data in the report and the database table is:

A:Line, B:Shift, C:Product, D:Batch, E:Units, F:Productivity, Stats etc.
 
Upvote 0
ok - I still have no idea what your resultant data will look like and how it relates to your original data.

Have you thought about using autofilter?

If you are looking to not do any calculation - and simply copy across data within a date range you can easily auto filter and copy.

(You can record a macro that does this - then modify the criteria)
 
Upvote 0

Forum statistics

Threads
1,206,920
Messages
6,075,575
Members
446,147
Latest member
homedecortips

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top