Ask Your Question

Need help getting if function to work. [closed]

asked 2016-10-26 23:32:45 +0100

Calcasieu gravatar image

I am requesting help to use an if function to do the following: if cells C3 and C8 are both empty, leave the cell empty, otherwise divide C8 by C3.

I entered this and it resulted in Err:509 =IF(C3:C8)="";"";(C8/C3)

Another problem is when I enter the above formula, it is changed to =IF(C3:C8)="","",(C8/C3) Notice that the semicolons are replaced with commas and still has Err:509.

Your help is greatly appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-14 14:50:02.284283

1 Answer

Sort by » oldest newest most voted

answered 2016-10-27 00:01:07 +0100

mark_t gravatar image

C3:C8 comprises all cells from C3 to C8, and you would use ctrl-shift-Enter to enter that formula, but I think that is not what you want.

Also you close parenthesis too soon and open again when you don't need to.


= IF(AND(C3="";C8="");"";C8/C3)


= IF(C3 & C8="";"";C8/C3)

But take care using the second example, the & is to join the two strings and then it checks if the joined string is empty.

Calc will show "," or ";" depending on your language settings, but will always accept ";" as delimiter for arguments.

If you are using macros to enter formula in cells then you have to use ";" .

edit flag offensive delete link more


Thanks, that worked. Appreciate the help.

Calcasieu gravatar imageCalcasieu ( 2016-10-27 01:52:21 +0100 )edit

Question Tools

1 follower


Asked: 2016-10-26 23:32:45 +0100

Seen: 44 times

Last updated: Oct 27 '16