Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel formula issue 2

Status
Not open for further replies.

Italian1

IS-IT--Management
Jun 24, 2013
5
US

Hi all,

I am trying to keep a running tally of hours both positive and negative. It is for timetracking of comp time. I have the daily tally working but I want a running tally column as well.

When I try this:
=IF(F10>=0,G9+F10,G9-(F10))

It is not subtracting the value if a negative number exists. It is adding the number as if it were positive. I know it is a double negative is a positive issue. How can I correect it?

Any help?

If I need to go to VBA macro what would that look like and how do I increment the formula down a column?

- Italian1
 
This is actual formula, pasted the wrong one.

=IF(F10>=0,G9+F10,G9-F10)

 
Why do you even need an IF statement? To keep a running tally, the formula should be =G9 + F10. Think about it, if F10 is -5 and G9 is 100, you want an answer of 95 (100 - 5). If F10 is +5, you'd want an answer of 105 (100 + 5)
 
I tend to overthing things sometimes - LOL

Thank you.




- Italian1
 
hi,

Really, if you're just interested in the latest value (not particularly the value on each row), then its just =SUM(F:F).

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,

It needs to be row specific. But thank you.


- Italian1
 
Use ABS(f10) which would give you the absolute value to do the subtraction.
 
Thank you, I just tried it and that worked as advertised! I was going insane trying to figure that out.


- Italian1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top