Ask Your Question
0

Need help getting if function to work.

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

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 close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

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.

Try

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

Or

= 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

Comments

Thanks, that worked. Appreciate the help.

Calcasieu gravatar imageCalcasieu ( 2016-10-27 01:52:21 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 29 times

Last updated: Oct 27 '16