*From*: John Machin <sjmachin lexicon net>*To*: gnumeric-list gnome org*Subject*: Re: Complex Calculations*Date*: Sun, 24 Feb 2008 07:54:54 +1100

Ralph Shumaker wrote:

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?

Of course.

Will it require a formula or an executablescript(which I do not yet know how to write)?

Two trivial formulas.

Any and all suggestions will be greatly appreciated. I will learn!

Get yourself a tutorial book on using spreadsheet programs.

Fred

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 likethis:In cell Gn: =if(Dn-Cn<365,sum(En-Fn),) In cell Hn: =if(Dn-Cn<365,,sum(En-Fn))

buy date / sell date / sell amt / buy amt which is not a logical/sensible order. Secondly, you don't need sum(En-Fn) ... just En-Fn is enough.

**Follow-Ups**:**Re: Complex Calculations***From:*Ralph Shumaker

**References**:**Re: Complex Calculations***From:*Norman Frederick

**Re: Complex Calculations***From:*Ralph Shumaker

[Date Prev][Date Next] [Thread Prev][Thread Next] [Thread Index] [Date Index] [Author Index]