How can I do this? (2)

N

nd2no

Please bear with me while I try to explain this. My worksheet does
lot of stuff - will transfer to pocket pc to use at work.

I drive from one place to another. Column G keeps track of the miles.

Column I is "Miles to fuel" - it subtracts G from a beginning figur
that I enter at the top of the column.
When I see that I'm getting low on miles, I buy fuel.

I enter the gallons I buy in Column J.
Column K figures the gallons at 5.5 mpg - miles I've just bought.
They're added back into "Miles to fuel".

Column O keeps track of the mileage at the fuel stops.
HOW CAN I ASK COLUMN P TO FIGURE THE MILES BETWEEN WHEN SEVERAL LINE
OF COLUMN O ARE ZERO

I.e. O3 to O8 are zeros - I didn't buy any fuel between those stops.
bought fuel at O9. I didn't buy fuel again until O19.
And so on. (Ultimate goal is to keep up with MPG.
 
F

Frank Kabel

Hi
try the following formulas
:
P3:
=IF(O3>0,O3,"")
P4: enter the following array formula (entered with
CTRL+SHIFT+ENTER)

=IF(O4>0,O4-INDEX($O$1:$O3,MAX(IF($O$3:$O3>0,COLUMN
($O$3:$O3)))),"")
and copy this formula down
 
N

nd2no

Hi Frank. Thanks for your time. This is (in part) what it might loo
like:

...........F ........... J................
.........................................P
........End........Gallons........Mileag
at..............................Miles
.......Mileage......bought.............Fue
.................................traveled
3....824435.........0.......=IF(J3>0,F3,0) (shows 0)
4....(....Not used....)......=IF(J4>0,F4,0) (always 0)
5....825125.......100......=IF(J5>0,F5,0) (shows 825125)
6....(....Not used....)......=IF(J6>0,F6,0) (always 0)
7....825526.........0........=IF(J7>0,F7,0) (shows 0)
8....(....Not used....).......=IF(J8>0,F8,0) (always 0)
9....825995.........0.........=IF(J9>0,F9,0) (shows 0)
10...(....Not used....)........=IF(J10>0,F10,0) (always 0)
11...826350........135.......=IF(J11>0,F11,0) (shows 826350)

How can I ask P to figure the difference between O5 and O11, etc
 

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