Microsoft Office Forums


Reply
Thread Tools Display Modes

copy partial worksheet to a different worksheet based on date??

 
 
Kevin J Prince
Guest
Posts: n/a

 
      09-07-2007, 09:45 AM

Hi,

The subject says it all??

How do I copy information from one worksheet to another based on a date?

I have a worksheet which I am keeping a list of equipment, date bought,
what it is, how much it cost, chargeable or not and where it was bought
from.

Some of this equipment is chargeable to a customer some not.

When I write an invoice I want to insert items from the equipment list
which have chargeable as YES or Y into the new invoice, but only for the
items which are for the week of the invoice. (That's Monday to Saturday
of that week).

Once again I'm assuming a Macro of VBA but have no idea where to start

Worksheets are, 'Equipment', 'Template' and 'Invoice XX' where XX is the
number and there will be quite a few of them. But only the current one
is to be actioned on.

Oh yes equipment can be added right up to the actual printing of the
Invoice XX time. So I assume I would have to run the macro at that time
or have some mechanism for checking if it was already in the invoice???

I had never realised how powerful Excel was until now!

Regards

Kevin

--
"I live in my own little world.
But it's OK. They know me here."
= = = =
Kevin J Prince
http://www.1and1.co.uk/?k_id=5257507
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a

 
      09-07-2007, 02:58 PM
One way is to use (record a macro while doing)
data>filter>autofilter>set your criteria>copy

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Kevin J Prince" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Hi,
>
> The subject says it all??
>
> How do I copy information from one worksheet to another based on a date?
>
> I have a worksheet which I am keeping a list of equipment, date bought,
> what it is, how much it cost, chargeable or not and where it was bought
> from.
>
> Some of this equipment is chargeable to a customer some not.
>
> When I write an invoice I want to insert items from the equipment list
> which have chargeable as YES or Y into the new invoice, but only for the
> items which are for the week of the invoice. (That's Monday to Saturday of
> that week).
>
> Once again I'm assuming a Macro of VBA but have no idea where to start
>
> Worksheets are, 'Equipment', 'Template' and 'Invoice XX' where XX is the
> number and there will be quite a few of them. But only the current one is
> to be actioned on.
>
> Oh yes equipment can be added right up to the actual printing of the
> Invoice XX time. So I assume I would have to run the macro at that time or
> have some mechanism for checking if it was already in the invoice???
>
> I had never realised how powerful Excel was until now!
>
> Regards
>
> Kevin
>
> --
> "I live in my own little world.
> But it's OK. They know me here."
> = = = =
> Kevin J Prince
> http://www.1and1.co.uk/?k_id=5257507


 
Reply With Quote
 
Kevin J Prince
Guest
Posts: n/a

 
      09-07-2007, 04:03 PM
Hi Don,

Thanks for the reply, however I was hoping to be able to set it as a
macro. I'm setting this up for my son, he knows where the on off switch
is and how to run excel, but the knowledge stops there.

I think what I'm after is a macro which scans the equipment worksheet,
when it finds something that matches both date and chargeable copies a
set of cells into another worksheet. Well actually inserts a line then
insert the required cells into that set of cells.

It's obviously going to involve some IF's etc, but I don't know how to
reference the different cells from within the same IF. If you know what
I mean. I'm OK with basic VB stuff, but how do you reference the
different cells and sheets. Is where I'm getting stuck.

For example, how do I know if I've reached the last entry in the
equipment sheet? While I'm parsing that is.....

Do while (somethow not eof??)
IF cell(Bx)= (existing date checking for) AND cell(Fx) = "Y"
then
(Do the transfer somehow)
Invoice.worksheet.cell(Ry)= equipment.worksheet.cell(Bx)
endif
Loop

In the above, how do I reference cell(Bx) the column part?

etc??

Help much appreciated please..... Any tutorial refs would also be useful
please.

Kevin



In message <edyDb#(E-Mail Removed)>, Don Guillett
<(E-Mail Removed)> writes
>One way is to use (record a macro while doing)
>data>filter>autofilter>set your criteria>copy
>


--
"I live in my own little world.
But it's OK. They know me here."
= = = =
Kevin J Prince
http://www.1and1.co.uk/?k_id=5257507
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a

 
      09-07-2007, 04:32 PM
Feel free to send a workbook along with copies of these posts and
before/afer samples to the address below.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Kevin J Prince" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Don,
>
> Thanks for the reply, however I was hoping to be able to set it as a
> macro. I'm setting this up for my son, he knows where the on off switch
> is and how to run excel, but the knowledge stops there.
>
> I think what I'm after is a macro which scans the equipment worksheet,
> when it finds something that matches both date and chargeable copies a
> set of cells into another worksheet. Well actually inserts a line then
> insert the required cells into that set of cells.
>
> It's obviously going to involve some IF's etc, but I don't know how to
> reference the different cells from within the same IF. If you know what
> I mean. I'm OK with basic VB stuff, but how do you reference the
> different cells and sheets. Is where I'm getting stuck.
>
> For example, how do I know if I've reached the last entry in the
> equipment sheet? While I'm parsing that is.....
>
> Do while (somethow not eof??)
> IF cell(Bx)= (existing date checking for) AND cell(Fx) = "Y"
> then
> (Do the transfer somehow)
> Invoice.worksheet.cell(Ry)= equipment.worksheet.cell(Bx)
> endif
> Loop
>
> In the above, how do I reference cell(Bx) the column part?
>
> etc??
>
> Help much appreciated please..... Any tutorial refs would also be useful
> please.
>
> Kevin
>
>
>
> In message <edyDb#(E-Mail Removed)>, Don Guillett
> <(E-Mail Removed)> writes
>>One way is to use (record a macro while doing)
>>data>filter>autofilter>set your criteria>copy
>>

>
> --
> "I live in my own little world.
> But it's OK. They know me here."
> = = = =
> Kevin J Prince
> http://www.1and1.co.uk/?k_id=5257507


 
Reply With Quote
 
Kevin J Prince
Guest
Posts: n/a

 
      09-08-2007, 06:01 AM
Thanks Don,

I've done that


In message <#(E-Mail Removed)>, Don Guillett
<(E-Mail Removed)> writes
>Feel free to send a workbook along with copies of these posts and
>before/afer samples to the address below.
>


--
"I live in my own little world.
But it's OK. They know me here."
= = = =
Kevin J Prince
http://www.1and1.co.uk/?k_id=5257507
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong Excel Newsgroup 0 08-23-2006 12:53 PM
Going to worksheet based on answer SAP PoD Excel Newsgroup 2 08-17-2006 01:04 PM
Populating a column in a worksheet from another worksheet based on a common field p.krembs@gmail.com Excel Newsgroup 1 08-01-2006 08:42 AM
Split worksheet into many based on Cell Brian Nordberg Excel Newsgroup 4 09-23-2003 09:53 PM
Creating a viewport of a worksheet/selection on another worksheet spidey3721 Excel Newsgroup 0 08-27-2003 08:17 PM



All times are GMT. The time now is 02:15 PM.