need macro ideas for storing report sheets to workbook

M

mike_KBR

HI!!
thanks for helping!!
Can anyone give me an idea(s) to write a macro that will
take my current report ( a template)for the day and purge
(store) say... to "workbook 1" , "page one" and then
renew the report sheet for new data and then store it
next to the previous page in the same worksheet as i
create a report for each day.
I will be doing 540 days worth of reports ( text and data)
and would like it under the same workbook.
If not at all impossible....have it sort or file the
reports by its date of inputinto its designated worksheet
by month..
example: reports on and thru to the 25th of month 1 to go
into month 1 sheet. and 26th thru 25th of the following
month into month 2 and to assign it current date to the
heading?
more examples:
workbook: "CIF_208"
worksheets created: month 1 > month 18
*month one will start from the date of contract signed
**each report month is to be from 26th to 25th each month

i dont know if this is a toughy but any help would be
awesome!!
(exhausted form trying)
mike
 
N

Nicky

Hi Mike,

it's hard to work out what you need without seeing the workbook, but
the attached example might give you some ideas.

The shaded range on the first sheet is your input range, including
today's date. A macro attached to the sheet calculates which month of
the contract this is. Running the macro copy_to_sheet copies the input
range to below the used range of the sheet corresponding to the month
of the contract.

It may give you some ideas, but the detail will obviously depend on the
exact ranges you're copying.

Attachment filename: example.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=423049
 
G

Guest

thsnk you nicky for helping. i can understand how it
works. I am still learning alot. Can yu tell me how in
the "name box" when i click the cell...say B2, it
says "start_date" . How did that get there? is it typed
there or ref. there by a formula or etc??
thanks. sorry to post another for something
littel..thanks again.
mike
 
G

Guest

hi, another ?. how did yu get the value of B4 to change
according to the date in the "today report" (B7)..
how did yu connect them together?? thanks!
 
N

Nicky

Hi

Start_date etc appear because I named those cells. Naming a cell mean
that, when you refer to it from eg a macro, it always refers to th
same information – it doesn’t change if you add or delete rows o
columns around it, as an address such as B14 would do. To name a cel
or group of cells (‘range’) you can either select the cell/s to nam
and type the name in the ‘name box’, or select Insert, Name, Define
then type in the name and address of the cells.

The value of B4 (named month_val) is changed by using a macro attache
to the worksheet “form”. It is run automatically every time th
worksheet changes. It counts the number of times between the beginnin
of the contract (start_date) and today’s date (ref_date) on which th
date is the 25th of the month, then returns this value to cel
month_val. As I understand your definition of the dates, I think thi
establishes which month of the contract the current date is.

To see this macro, right click on the ‘form’ tab at the bottom of th
page, and select ‘view code’
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top