Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: kilometeradministratie in open office vraagje  (gelezen 540 keer)

menu76

  • Gast
kilometeradministratie in open office vraagje
« Gepost op: 2007/07/29, 15:15:57 »
Hallo allemaal,
ik wil graag in openoffice  het volgende doen:
Ik heb drie velden:

Beginstand in kilometers
Eindstand in kilometers
Gereden kilometers

Ik zou graag wilen dat als ik willekeurig  twee van de velden invul dat dan het derde veld ingevuld raakt.
hoe doe ik dat?
Alvast heel erg bedankt,
Menu

mailmehiermaarATyahooDOTcom

menu76

  • Gast
kilometeradministratie in open office vraagje
« Reactie #1 Gepost op: 2007/07/29, 17:03:27 »
In het openoffice calc forum heeft iemand het voor me opgelost: hier zijn suggestie in het engels

This is a bit tricky, because you can't be sure if you want a number in a cell or a calculation.

If you don't mind having three cells for data entry and other cells with the calculations, then it's easy. Assuming start in A1, end in A2, travelled in A3, then put in cells C1, C2, and C3:

=IF(COUNT($A$1:$A$3)=2;IF(ISBLANK(A1);A2-A3;A1);"N/A")

=IF(COUNT($A$1:$A$3)=2;IF(ISBLANK(A2);A1+A3;A2);"N/A")

=IF(COUNT($A$1:$A$3)=2;IF(ISBLANK(A3);A2-A1;A3);"N/A")

These work on the idea that if there are 2 values, then do a calculation if the relevant cell is blank or just show the value if it's already specified, but if there are not 2 values, then show N/A.