PDA

View Full Version : Solved: Problems calculating static dates.



ctuna
02-08-2008, 05:36 PM
I am trying to keep track of hours on equipment to send it off for repair.

I have a column I enter a static date in when equipment goes out.

I hve another column I enter another static date in when Equipment comes in.

I calculate the number of days between the dates with this formula in another column. =H62-$I$62
Works fine.

I have another column I calculate the number of days X 20 giving me a number of hours using this formula =INT(20*((L62)))
Works fine.

The problem I have is next time the equipment goes out I enter a new static date and it throws all my numbers out of wack.

What I am trying to do is to stop my numbers from resetting and just keep totaling up.

In other words the first time the equipment goes out and comes in = 200 hrs, when I put the next date in it will not reset, but stay at 200 hrs.

The next time it comes in = 100 hrs. It will add it to the previous #, 200 hrs. = a total of 300 hrs.


Any Help would be greatly appreciated!!!!:banghead:

Trevor
02-08-2008, 06:36 PM
Try changing =INT(20*((L62))) to =(20*((L62))) and I would check all formulas used and make sure u don't have any that are summing the colum continiously
It looks like to me your proble might be the use of =Int and in your description it looks like u just want the value of (20*9[L62]))
is your Value from L62 static or dynamic? I hope its static
sorry I couldn't be of more help

ctuna
02-08-2008, 08:04 PM
L62 is dynamic

Trevor
02-08-2008, 09:41 PM
L62 would then calulate whatever # is in the cell unless it is set to nothing on load of the form,
what sounds like is hapening is L62 is storing the previous value and includin that in all calculations

Bob Phillips
02-09-2008, 03:24 AM
ctuna,

The only way to get the cell to increment is to use VBA event code which will add the newly calculate value to the value already there.

Trevor
02-09-2008, 10:06 AM
Coud you attach youd project as a zip so I can try to help that way

ctuna
02-09-2008, 11:29 AM
Thanks for trying to help guys. :friends:
Here is my project. :p
I tried to change a few things, but iI had no luck.:dunno

RonMcK3
02-09-2008, 02:30 PM
ctuna,

A minor problem that I noticed: the formula in column I is F4-$G$4 for row 4. So, in row5 the formula is F5-$G$4 and F6-$G$4 for the 6th line, etc. Your In Date and Out Date values increment 1 with each new line so the difference in Col I should be 10 each time, however, the difference increments by 1 because the first line (not the current line) Out Date is being subtracted.

Bob Phillips
02-10-2008, 06:52 AM
This my understanding of what you asked

ctuna
02-11-2008, 06:59 PM
:clap: Thank you very much xld, it works great.:friends: