TrimPath Forum


About TrimPath stuff, like Junction, Next Action, JavaScript Templates, TrimQuery, TrimSpreadsheet, etc...

You are not logged in.

#1 2005-12-19 18:16:19

chudq
New member
Registered: 2005-12-19
Posts: 1

Add conditions for functions

It would be nice if a further field is available for adding condtions for all the current build-in functions. For example:

Code:

"=MIN(F2:F4) ? (VALUE > 0)"

where () contains conditions and VALUE is a key word for values in the rage. So my MIN function with a condition is to calc a min value in the range from F2 to F4 where values are larger than 0.

In Excel, I have to create my own function with VBA to do that. It would be nice if NumSum can add conditional feature to calc values so I can do the same calc in NumSum as I do with excel but with a simple function call.

Where do I use this type of function with conditions ? For example, I a list of data of credit information: vendor, expense values, .... I want to get the MIN and MAX spending values (positive values) but not including credit or payments (negative values). By using a function with conditions, I could easily calc values I want. Otherwise, it is very hard to get the value I want by using MIN or MAX funtions without conditions (MIN or MAX calc all the values in the range without conditions). I guess you may figure out many other extended condtions (like <=, >=, ==, >, <, !=, key words like EPSON, VALUE, AND, OR, range with nested conditions). You can just start with simple ones.

I like NumSum very much!

Offline

 

#2 2005-12-24 08:25:55

steve.yen
Chef
From: Silicon Valley
Registered: 2005-07-10
Posts: 252
Website

Re: Add conditions for functions

Hmmm.  I'll have to think about that one.

By the way, the existing syntax in Num Sum to do conditionals looks like...

=TEST_EXPRESSION ? TRUE_EXPRESSION : FALSE_EXPRESSION

For example...

=(MIN(F2:F4) > 0) ? "balance is good" : "bad balance"

So I'll have to think about how to create what you want but ideally keep backwards compatibility.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson