Heyho,
Do the spreadsheet may work with " if then else" stuff?
Br kc
IF THEN ELSE in a spreadsheet?
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: IF THEN ELSE in a spreadsheet?
Yes, it's similar to the conditional operator in C: <test> ? <true-branch> : <false-branch>kc79 wrote:Heyho,
Do the spreadsheet may work with " if then else" stuff?
Example: = (A1 > A2) ? 1 : 2
...will give 1 if A1 > A2, and 2 otherwise.
Eivind
Re: IF THEN ELSE in a spreadsheet?
This doesn't work in FC 0.17:
Assembly 3 notes: https://github.com/ceremcem/freecad-notes
Re: IF THEN ELSE in a spreadsheet?
You necrobumped a rather old topic. Consider to open a new and reference the old. Now for your issue:
Omit the brackets, i.e. write
I could have used a screenshot to show this, but writing such things as plain text has two advantages: It saves bandwith! Your image consumes 117.14 Kilobytes, which is approximately 1000 times the size some text would need.
The second reason is, that your image cannot be searched by other users having the same problem.
Omit the brackets, i.e. write
Code: Select all
=B1 > 2 ? 1 : 2
The second reason is, that your image cannot be searched by other users having the same problem.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: IF THEN ELSE in a spreadsheet?
Thanks Chris, that worked.chrisb wrote: ↑Sat Sep 22, 2018 2:05 pm Omit the brackets, i.e. writeCode: Select all
=B1 > 2 ? 1 : 2
Searches directly led me to the topic, so I thought someone else would also come here, which in turn made sense to resume the thread.You necrobumped a rather old topic. Consider to open a new and reference the old.
I've never seen that the bandwidth was a problem before, anyway, I had no choice this time because there were no error messages in the output. I'm filing a bug for this.I could have used a screenshot to show this, but writing such things as plain text has two advantages: It saves bandwith! Your image consumes 117.14 Kilobytes, which is approximately 1000 times the size some text would need.
In this particular context, I think previous content is quite enough for further searches (as I found the topic by google search).The second reason is, that your image cannot be searched by other users having the same problem.
Sorry for any inconvenience, it'll take some time to get used to the FreeCAD forum.
Assembly 3 notes: https://github.com/ceremcem/freecad-notes