Help with formula

R

Ren

Greetings!

Purpose: total miles that were driven last night in co. vehicles. i.e. when
they left the parking lot and when they came back the next morning.

Problem: the formula =SUM(('Mileage Log'!E12-'Mileage Log'!E10) >0) gives me
a true (1) false (0) answer. I want it to exclude negative numbers; if it
isn’t negative then I want to keep the first value.

On Sundays no one come into work in the morning so it calculates the
formula into a negative number like -48,158 and that throws off any totaling
of how many miles john doe drove. I got that formula to change it from a
negative, thought I had the formula right then realized the 1 meant true is
more than 0. So basically, if it’s true than I was the answer how it should
be and if it’s false i.e. a negative then I want it a 0 so I can finnally
make a complete report on driving habits.

THANKS for any help all !!!!
 
S

Sandy Mann

If I am following you correctly try:

=IF('Mileage Log'!E12-'Mileage Log'!E10>0,'Mileage Log'!E12-'Mileage
Log'!E10,0)

If the formula is in the same sheet as the milage figures then you don't
need to reference the sheet so you only need:

=IF(E12-E10>0,E12-E10,0)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
R

Ren

Thanks for the tips Sandy.

Although I've given up on this sheet but I'm trying to think of a way to
make a access dtb for this. Somehow I've managed to put macos in the excel
sheet and I am unable to remove them.. :-??

if anyone has any ideas on how i could acheive in access, or another way in
excel, i'd really appriciate it. It seems so simple yet is totally just
confusing me....
--
~~"Don''t Panic"~~ \(^O^)/


Sandy Mann said:
If I am following you correctly try:

=IF('Mileage Log'!E12-'Mileage Log'!E10>0,'Mileage Log'!E12-'Mileage
Log'!E10,0)

If the formula is in the same sheet as the milage figures then you don't
need to reference the sheet so you only need:

=IF(E12-E10>0,E12-E10,0)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 

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