Please help! Macros

L

LiAD

Hi,

I've had a few unsuccesful attempts with this question, some solutions but
none that I can get to work yet.

I have four macros on two different excel sheets all controlling a value in
the same cell. On sheet 1 (which I call UP4 Données) I have two macros which
either add or subtract 1 from cell I38 every time the button is pushed. On
sheet 2 (called UP1 Production) I have another two macros which do the same
thing - they add and subtract 1 but this time from cell L6 (sheet 2
remember). I agree this seems a bit long winded and could be simpler but its
better I keep the multientry approach for the user.

I need a macro program which does the following operations

- I hit +1 five times and -1 twice on sheet 1. My stock, (cell I38 sheet UP4
Données), goes from 20 to 23.
- I then hit +1 ten times and -1 once on sheet UP1 Production. Cell L6 on
sheet 2 will show that I have entered a total of 9 times.
- Cell L6 will then update cell I38 on UP4 Données 1 from 23 to 32.
- Cell L6 sheet 2 will reset to zero and cell I38 UP1 Production will stay
at 32
until the next update arrives.
- On sheet 3 which we will call Register I would like to create an excel
table that will record which macro button was pushed along with the date and
time it was pushed, all on one long vertical list.

My last need is to have some means of the saving the entries - say 20
seconds after the last entry the file is resaved automatically. For
reference this is one quarter of the total work I need, once I have the above
formulas, macros etc I will repeat it four times, but it will be exactly the
same, just for different cells. I'm not sure if that changes anything, if it
does or its better to have one formula for all cells then that will have the
same operation applied then I can include those cells references.

I have attached the +1 macro i am using below for reference just to give an
idea of where I am starting from.

Is this too complicated for one macro?

Thanks for your help

Sub Production15()
With Sheet2 ' Changer to suit
If Range("L6").Value <> "" Then ' Change L6 to suit
Range("L6").Value = Range("L6").Value + 1
End If
End With
End Sub

Thanks
 

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