Need help getting if function to work

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.

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 “;” .

Thanks, that worked.
Appreciate the help.