[Solved] =IF ISBLANK and if not ISTEXT and if not::

Discuss the spreadsheet application
Post Reply
pherriot
Posts: 54
Joined: Wed Mar 27, 2019 1:06 pm

[Solved] =IF ISBLANK and if not ISTEXT and if not::

Post by pherriot »

Hi People.
Using a previous users formula I have attempted to be smart....and havent been.
The formula is "trying" to check for:
BLANK and if so return that
TEXT and if so return that
if none of the above then take value from sheet "WK 1.C21" and subtract from "Wk 1.D21"

.....and heres is my attempt:
=IF(ISBLANK($'Wk 1'.C21);"";IF(ISTEXT($'Wk 1'.C21)$'Wk 1'.D21-$'Wk 1'.C21))
...I get the "Err:509"

FYI:
Wk 1'.C21 is a time
Wk 1'.D21 is a time
Any help is appreciated.
Cheers.
Attachments
IF part 3.JPG
Last edited by pherriot on Thu Mar 28, 2019 4:46 pm, edited 1 time in total.
OpenOffice 3.1 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: =IF ISBLANK and if not ISTEXT and if not subtract one ce

Post by Villeroy »

There is a semicolon missing between )$
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
pherriot
Posts: 54
Joined: Wed Mar 27, 2019 1:06 pm

Re: =IF ISBLANK and if not ISTEXT and if not subtract one ce

Post by pherriot »

Hi, thanks for the reply. Cant believe that one slipped....

However the subtraction is not working - Wk 1'.D21-$'Wk 1'.C21 instead it returns a result of 00:00

An the IFTEXT appears to not be working (please see images) i.e. the text is not passed back but instead results in the error #VALUE!

=IF(ISBLANK($'Wk 1'.C21);"";IF(ISTEXT($'Wk 1'.C21);$'Wk 1'.D21-$'Wk 1'.C21))
Attachments
The formula reads form these cells "D21" and "C21" in Sheet "Wk 1"
The formula reads form these cells "D21" and "C21" in Sheet "Wk 1"
IF part 6.JPG (10.18 KiB) Viewed 867 times
Accepts numerical values but doesnt calculate
Accepts numerical values but doesnt calculate
Does not accept text string #VALUE! error
Does not accept text string #VALUE! error
OpenOffice 3.1 on Windows Vista
pherriot
Posts: 54
Joined: Wed Mar 27, 2019 1:06 pm

Re: =IF ISBLANK and if not ISTEXT and if not subtract one ce

Post by pherriot »

.....it works fine when theres no BLANK and TEXT checking

=($'Wk 1'.D21<$'Wk 1'.C21)+$'Wk 1'.D21-$'Wk 1'.C21 returns the time difference between the 2 values "08:15" hrs.
Attachments
Formula in operation but without the checks
Formula in operation but without the checks
IF part 7.JPG (17.03 KiB) Viewed 866 times
OpenOffice 3.1 on Windows Vista
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: =IF ISBLANK and if not ISTEXT and if not subtract one ce

Post by RusselB »

After the ISTEST check you only have one parameter, which is the parameter you have specified to be returned when the ISTEXT is false.

Code: Select all

=IF(ISBLANK($'Wk 1'.C21);"";IF(ISTEXT($'Wk 1'.C21);$'Wk 1'.C21;$'Wk 1'.D21-$'Wk 1'.C21))
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
pherriot
Posts: 54
Joined: Wed Mar 27, 2019 1:06 pm

Re: =IF ISBLANK and if not ISTEXT and if not subtract one ce

Post by pherriot »

Thanks RusselB. Very much appreciated.
Cheers.
OpenOffice 3.1 on Windows Vista
Post Reply