HP Forums
IF statement, delimiters, blanks in spreadsheet - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: IF statement, delimiters, blanks in spreadsheet (/thread-1583.html)



IF statement, delimiters, blanks in spreadsheet - resolved - 06-10-2014 03:44 AM

I would like to replicate the following spreadsheet command in the HP Prime spreadsheet

=if(a2="";"";ATAN(b2/a2))

if I divide by zero or a blank cell I get an error message. If I use the above command on a spreadsheet in my computer, the command clears the error messages so summation further down can still calculate.

I have tried using ',' or ';' as delimiters
I have tried suing "" or '' for blank cells, but nothing worked and there is nothing in the manual on this topic, and internet searches bore little fruit

thanks for the help


RE: IF statement, delimiters, blanks in spreadsheet - Michael de Estrada - 06-10-2014 04:04 AM

Try using this:

=IFTE(A2=0,"",ATAN(B2/A2))

You need to use the IFTE form of the IF statement in a spreadsheet. Note that the Prime spreadsheet treats a blank cell as zero for a numerical comparison. Also, it is ok to use lower case a2 for the cell address, but I like to use capital letters for consistency with the default cell column names.


RE: IF statement, delimiters, blanks in spreadsheet - resolved - 06-10-2014 04:18 AM

Thanks Michael, that was great, it worked

BTW, is there any resource out there for the commands in the HP Prime Spreadsheet so I would have something of value to refer to . HP's 616 page document on the Prime only offered a small example on their spreadsheet and NO information about the various command there in.

again thanks for the help.


RE: IF statement, delimiters, blanks in spreadsheet - Michael de Estrada - 06-10-2014 04:28 AM

(06-10-2014 04:18 AM)resolved Wrote:  BTW, is there any resource out there for the commands in the HP Prime Spreadsheet so I would have something of value to refer to . HP's 616 page document on the Prime only offered a small example on their spreadsheet and NO information about the various command there in.

Other than using the Help button with the Toolbox Catalog, I know of none. Basically, most functions in the catalog, including CAS functions, will work in the Spreadsheet App, which makes it a lot more powerful than a computer spreadsheet such as Excel.


RE: IF statement, delimiters, blanks in spreadsheet - cyrille de brébisson - 06-10-2014 05:51 AM

Hello,

>BTW, is there any resource out there for the commands in the HP Prime Spreadsheet.

Any 'normal' Prime function will work in the spreadsheet...

They are a couple of functions that behaves differently in the spreadsheet, these are the so called "multi return functions" which are listed in "MENU" key when in the spreadsheet.

cyrille


RE: IF statement, delimiters, blanks in spreadsheet - Tim Wessman - 06-10-2014 02:19 PM

(06-10-2014 04:04 AM)Michael de Estrada Wrote:  Prime spreadsheet treats a blank cell as zero for a numerical comparison.

All spreadsheets do the same. It is actually a special 0. Many spreadsheets now normally hide the 0, but you can still get it without too much difficulty in excel for example.