Norman Frederick wrote: > Thanks, John Machin for reply. What I am trying to do is: > Column C and D are dates. > Column D and F are dollar numbers. > Column G is less than one year - 365 days. > Column H is greater than one year - 365 days. > The operation I want to perform is: > > IF datedif is less than 365 G =sum(Dn - Fn) else H=sum(Dn - Fn) > > > Can this be done? Will it require a formula or an executable > script(which I do not yet know how to write)? > Any and all suggestions will be greatly appreciated. > I will learn! > Fred > _______________________________________________ > gnumeric-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gnumeric-list > > First of all, you have column D being both a date and a dollar amount. So let's assume that you meant that column E is the dollar amount.
If C and D are both in date format then you should be able to do it like this: In cell Gn: =if(Dn-Cn<365,sum(En-Fn),) In cell Hn: =if(Dn-Cn<365,,sum(En-Fn)) There may be a better way. But I think that this will do what you want. -- Ralph -------------------- The spelling of words is subordinate. Morbidness for nice spelling and tenacity for or against one letter or so means dandyism and impotence in literature. --Walt Whitman _______________________________________________ gnumeric-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnumeric-list
