Ask Your Question
1

In Calc how can I write a formula to test for an empty cell? [closed]

asked 2014-12-26 06:27:41 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am searching for the syntax for this logic: If (A1 is not empty); A1; blank)

That is, I want to copy the contents of a cell with numeric content only if it is not blank.
Without some logic to test a blank cell a 0 is placed in the destination cell.

Thanks much for any help, -deac

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 2016-03-07 03:09:28.754704

1 Answer

Sort by » oldest newest most voted
1

answered 2014-12-26 07:25:22 +0200

ROSt52 gravatar image

updated 2014-12-26 07:30:16 +0200

You can test a cell for being empty (=blank) using =ISBLANK(cell reference). Result is either TRUE of FALSE.

However when your test cell should be the cell with a new value, you create a loop and the function doesn't work. This means you need you need something else. What is not possible to say because I don't know your spreadsheet and your application,

The only chance I see is to use a macro but this may only run once. Otherwise the result will be changed again based on the modifications made during the first run.

Think also about the reason for entering the 0 into the cell you want to test for blank. Maybe you can find a solution here.

edit flag offensive delete link more

Comments

Building on ROSt52's answer, you can use =IF(ISBLANK(A1),"",A1) in the target cell.

JKEngineer gravatar imageJKEngineer ( 2014-12-26 22:03:31 +0200 )edit

Thank you for the right answer, but you have a mistake in jour sintax. There are ; not , signs to seperate statements.

=IF(ISBLANK(A1);"";A1)

markop gravatar imagemarkop ( 2019-07-30 15:56:45 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2014-12-26 06:27:41 +0200

Seen: 25,529 times

Last updated: Dec 26 '14