# Re: Complex Calculations

• From: Ralph Shumaker <rafazap cwnet com>
• To: gnumeric-list gnome org
• Cc: Norman Frederick <normfred charter net>
• Subject: Re: Complex Calculations
• Date: Sat, 23 Feb 2008 09:55:04 -0800

```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
gnumeric-list gnome org
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

```

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