Move and reset valuse using a command Button

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Can I use a command Button to move cell valuse from one cell to another. I
then want to reset a 3rd cell to 0.
I have a spread sheet that I use to work out how much fuel I have used each
day.
I input what I have left for the day in one cell and yesterday volume in
another.
I would like to be able to use a command button to transfer "todays" figure
to "yesterdays" and then reset the "used" cell to "0" when I open the sheet
the next day. Therefore I would only having to input todays figure. What
would be the best way for this.

30/12/09
From
Yesterday = 200m³. (in Cell A52). Today = 175m³. (in Cell B52). Used = 25m³
(in Cell C52).

31/12/09
To
Yesterday = 175m³. (in Cell A52). Today = 175m³. (in Cell B52). Used = 0 m³
(in Cell C52).

Thanks for your help.
Chris
 
Hi Simon.
Sorry form the late reply as I have been fishing.
I have found a code that i changed to suit my needs and is working well.
This it below.
Regards
Chris

Option Explicit


Sub test()

ActiveSheet.Range("I20:I23").Copy
Range("F20").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Simon Lloyd said:
Chris said:
Can I use a command Button to move cell valuse from one cell to another.
I
then want to reset a 3rd cell to 0.
I have a spread sheet that I use to work out how much fuel I have used
each
day.
I input what I have left for the day in one cell and yesterday volume
in
another.
I would like to be able to use a command button to transfer "todays"
figure
to "yesterdays" and then reset the "used" cell to "0" when I open the
sheet
the next day. Therefore I would only having to input todays figure.
What
would be the best way for this.

30/12/09
From
Yesterday = 200m³. (in Cell A52). Today = 175m³. (in Cell B52). Used
= 25m³
(in Cell C52).

31/12/09
To
Yesterday = 175m³. (in Cell A52). Today = 175m³. (in Cell B52). Used
= 0 m³
(in Cell C52).

Thanks for your help.
Chris


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=165803

Microsoft Office Help

.
 
Back
Top