Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I add group of cells where the formula results in those cells aren't " "?

The problem I'm having is this: when adding a group of cells (each containing a formula that may output a number or " ") are returning an error since it contains a formula "string" instead of a number.


Example: Since:


=IF(($C13>0),($C13÷$F$9)," ")


returns an empty cell, I get an error saying that cell cannot be used to sum a group of cells.


ERROR MESSAGE: "The operator "+" expects a number, date or duration, but the [" "] cell contains a string."


Thank you for your help!

MacBook Pro, OS X Mavericks (10.9.1)

Posted on Feb 17, 2014 11:30 PM

Reply
Question marked as Best reply

Posted on Feb 17, 2014 11:53 PM

Hi Joe,


" " inserts a space which looks blank but isn't.


"" inserted from a formula gives a NULL character which also looks blank (but is a string of zero length). Maybe that will work.


If not, another idea is to insert zero and then conditionally highlight cells with zero to white text (that also appears blank 😉).


Regards,

Ian.

9 replies
Question marked as Best reply

Feb 17, 2014 11:53 PM in response to JOEnTN

Hi Joe,


" " inserts a space which looks blank but isn't.


"" inserted from a formula gives a NULL character which also looks blank (but is a string of zero length). Maybe that will work.


If not, another idea is to insert zero and then conditionally highlight cells with zero to white text (that also appears blank 😉).


Regards,

Ian.

Feb 18, 2014 12:20 AM in response to Yellowbox

Thank you Ian! I tried the "" solution and it recognizes it as "." somehow. I *could* do the white text option as a final final solution but that would require so much re-working of other calculations & sheets that acknowledge " " as a stopping point in IF statements.


I'm hoping for a solution that will prevent that much extra work since I've already put in so much time getting the other formulas to cooperate with me.


Thanks again!

Feb 18, 2014 12:20 AM in response to Yellowbox

Hi again Joe,


The SUM function may be easier than using + for every cell.


I tested "" in a column with some values. Every "blank" cell contains the formula ="" (a much shorter version of the formula you will use!)


User uploaded file


Bottom left left of the window shows the formula.


To get the sum, B8 contains this formula:


=SUM(B)


This works because Row 1 is a Header Row and Row 8 is a Footer Row which excludes them from the Body Cells in B (B2 to B7). Otherwise B8 would refer to itself and show a self reference error.


Regards,

Ian

Feb 18, 2014 12:26 AM in response to JOEnTN

Hi Joe,


re-working of other calculations & sheets that acknowledge " " as a stopping point in IF statements.


Aahaa! The plot thickens!


Please reply with a screen shot of a small part of your screen (large shots are often difficult to read).


To take a screen shot,


1. hold down the shift and command keys, then type 4. The cursor will change to crosshairs. Release the shift and command keys.


2. Drag over that part of your screen then release the mouse/trackpad. A screen shot will appear on your desktop.


3. In a reply to a message, click on the camera icon in the Toolbar above your reply and


4. Choose File > Choose > Insert Image.


If this does not work, Close the Insert Box (red cross on the top right) and go back to Step 3. Camera icon sometimes needs a wake-up call, but works the second time.


Remove any personal details before taking the screen shot.


Regards,

Ian.

Feb 18, 2014 12:31 AM in response to JOEnTN

Hi Joe,


"The operator +" chokes on text (including the empty string).


The Function SUM, given a full column reference, a range of cells, or a list of cells, ignores cells containing text.

User uploaded file

Formulas shown in column A are entered in the adjacent cell in column B. Either of the entries in C6 ( = "" ) and C9 ( text ) will triggere the error shown.


Regards,

Barry

Feb 18, 2014 12:47 AM in response to JOEnTN

Hi Joe,


See the formula in A4 of my screen shot. You'll need to use something like this as you are adding non-contiguous cells. In the Actual column, enter =SUM() then place the insertion point between the parentheses and alternate these actions:


Click one of the coloured cells,

type a comma

Repeat


No comma following the last cell clicked.


Regards,

Barry

How can I add group of cells where the formula results in those cells aren't " "?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.