Copy Cells/Paste Cells Programatically

  • Thread starter Thread starter Brig Siton
  • Start date Start date
B

Brig Siton

I have a table that looks like the one below

Date Invoice Discount
8/1/06 $100 $20
8/2/06 $200 $40
8/3/06 $300 $80
8/4/06 $400 $160
8/5/06
....
8/31/06

The Invoice column and Discount columns are Dollar amounts that changes
daily.

Its getting its values from another excel sheet. The problem is that this
excel sheet is not driven by dates or any uniform database format. The
figures in this excel shee are manuall entered by users and gets totaled at
the end of the day. These totals represents the Invoice and Discount for
the day. The totals are in fixed, stagnant cells so this one is quite easy
to refer to.

What we want to achieve is that in a daily basis, we run a macro that will
copy the totals to this table that we create and paste the values into the
same date when they run the macro. If they missed running it on that day,
the macro will skip that day.

Let me know if this is something that is doable in excel.

Thank you.
 
I'm not sure I completely understand what you want to do but it does
sound doable. Try this for starters:
Sub MoveStuff()
'Macro Written 8/29/2006 by cchickering
Sheets("TotalsSheet").Range("A1:B1").Copy Sheets("Summary").Range("A" _
& Sheets("Summary").Rows.Count).End(xlUp).Offset(1,1)
Sheets("Summary").Range("A" & Sheets("Summary").Rows.Count).End(xlUp).
_
Offset(1,0) = Date
End Sub

This copies the Invoice and Discount amounts from the sheet
"TotalsSheet" Ranges A1 and B1 to the end of sheet "Summary", columns B
& C and adds today's date in Column A.

Let me know if you need more help

Charles
 
Back
Top