Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Formula Syntax? 2

Status
Not open for further replies.

RosewoodCrocket

Programmer
Jan 20, 2006
7
Forgive me as I've not used Lotus in a long time, and I do not have it in front of me currently...

If one enters a formula into Lotus, say:

1 + 2

Or

@SUM(A1:C3)

Does the system automatically add a leading "=" sign, or Lotus operates without the "=" sign?

Also is it legal to even enter:

1 + 2

as a formula, or must I lead with, say, a "+" sign, as in:

+ 1 + 2

Thanks in advance for everyone's help...

-- Mike
 
Every formula must begin with one of these:

+
-
@ function
(
or any number

You don't commence with the = sign.

The expression @SUM(Al:C3) should be @SUM(A1..C3)



 
Thank's CrazyBird, I really appreciate it...

Just to clarify, what if I did put

1 + 2

in a cell? Would it be intepreted as text and not as an equation evaluating to 3?

And based on what you wrote above, would writing

(1 + 2)

in a cell evaluate to 3?

Thanks again, and I'm sorry for such noobie questions...
 
By default, all cells are formatted as GENERAL, and this will result in the the following...

When the FIRST character entered (into a cell) is a NUMBER or character used in a formula - i.e. the "(" character, then Lotus 123 treats the ENTIRE entry as a NUMBER or as a FORMULA.

Your example "(1 + 2)" will be treated as a FORMULA.

If a user does NOT want the entry to be treated as a NUMBER or FORMULA - but as TEXT - then there are two options:

A) use a "label prefix" as the first character. There are 3 choices: 1) ' - aligns entry on LEFT, 2) ^ - aligns entry in CENTER, 3) " - aligns entry on RIGHT.

B) Format the cell as "TEXT"

Hope this helps. I would have left this for crazybird to answer, but he hasn't logged in since the 20th.

Regards, Dale Watson
 
Dale,

I really appreciate that extremly clear description. :)

One last question: so the formula:

= 1 + 2

Would be evaluated to '3' in both Lotus and Excel? I am basing this on the assumption that the "=" sign would also qualify as " character used in a formula" as you put it?

Thanks a ton Dale, and CrazyBird...
-- Mike
 
In Excel: =1+2 will evaluate to 3

In 123: 1+2 will evaluate to 3 (do NOT use the "=")

The "=" character is an "equal" sign in both Excel and 123, but as shown above, in Excel it's REQUIRED as the first character, whereas in 123 it's NOT required.

The equals (=) character is also often used in formulas - for example especially in long formulas with compound conditions and various functions - in both 123 and Excel. And it's often used together with the > (greater than) or < (less than) characters.

As a programmer, I expect I'm been more elaborate than I need to, but I'm doing so for others who might want to use this and don't have a programming background or are new to spreadsheets.

Also, as previously mentioned by crazybird, you can begin a formula with a function. In 123, functions begin with the @ character, whereas with Excel it's the = character.

Hope this helps.

Regards, Dale Watson
 
Hi Dale,

I am absolulely grateful for your detailed responses. I am a programmer too; however at the moment I do not have Lotus in front of me (and have not used it since about 1993!) and need to have a proper evaluator written...

My only question left, then, regards this quote:

> "In 123: 1+2 will evaluate to 3 (do NOT use the '=')"

Does this mean that a leading "=" in Lotus 123 would result in an invalid formula because it would, essentially, be a compound expression without a Left-Hand-Side?

If so, would an error result, or would the entry be effectively treated as a text entry, literally as the string "=1+2"?

I really apreciate it a ton Dale, I think this is my last issue... Sorry to persue this question to death...

Thanks again,
Mike
 
Mike,

Where I said... (do NOT use the "=") ...This is simply because you don't have to use it. In fact, if you do use it before a number or before another math character like the "(" character - e.g. (1+2), the 123 will simply IGNORE the "=" character - i.e. it will NOT be entered into the cell.

So, to summarize, typing/entering "=1+2" will result in "1+2" being entered as a formula into the cell, resulting in a value of 3.

If you were to enter a label-prefix as the first character (either ' ^ or " ) - e.g. "1+2 (entering the double quote character, followed by 1+2) will result in 1+2 being entered as TEXT on the Right-Side of the cell. This is because the " character instructs 123 to treat whatever follows as TEXT, and to align it on the right-side of the cell.

Hope this provides the clarification you're seeking.

Regards, Dale Watson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top