ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Help with formula (https://www.excelbanter.com/new-users-excel/145123-help-formula.html)

Ren

Help with formula
 
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
isnt 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 its true than I was the answer how it should
be and if its 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 !!!!
--
~~"Dont Panic"~~ \(^O^)/

Sandy Mann

Help with formula
 
If I am following you correctly try:

=IF('Mileage Log'!E12-'Mileage Log'!E100,'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-E100,E12-E10,0)

--
HTH

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


with @tiscali.co.uk


"Ren" wrote in message
...
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 !!!!
--
~~"Don't Panic"~~ \(^O^)/




Ren

Help with formula
 
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" wrote:

If I am following you correctly try:

=IF('Mileage Log'!E12-'Mileage Log'!E100,'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-E100,E12-E10,0)

--
HTH

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


with @tiscali.co.uk


"Ren" wrote in message
...
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 !!!!
--
~~"Don't Panic"~~ \(^O^)/






All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com