ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   why doesn't excel count "numbers" in an IF formula (https://www.excelbanter.com/excel-worksheet-functions/226047-why-doesnt-excel-count-numbers-if-formula.html)

Noddy2011

why doesn't excel count "numbers" in an IF formula
 
My formula is =IF(AND(0<J3,J3<6),J3+1,"6") but when i use sum to add the
cells together is doesn't count any cell with "6" in. Why is this and how do
i change this please.

Mike H

why doesn't excel count "numbers" in an IF formula
 
Hi,

The quotes around the 6 make it text so sum won't add them up

=IF(AND(J30,J3<6),J3+1,6)

Note I've also changed the formula to a more understandable format.

Mike

"Noddy2011" wrote:

My formula is =IF(AND(0<J3,J3<6),J3+1,"6") but when i use sum to add the
cells together is doesn't count any cell with "6" in. Why is this and how do
i change this please.


Domenic[_2_]

why doesn't excel count "numbers" in an IF formula
 
Remove the quotes from the number 6, otherwise it will be formatted as
text..

=IF(AND(0<J3,J3<6),J3+1,6)

Hope this helps!

http://www.xl-central.com

In article ,
Noddy2011 wrote:

My formula is =IF(AND(0<J3,J3<6),J3+1,"6") but when i use sum to add the
cells together is doesn't count any cell with "6" in. Why is this and how do
i change this please.


Mike H

why doesn't excel count "numbers" in an IF formula
 
Hi,

I don't understand the question. You can't directly change a cell colour
with a formula but you can evaluate the formula result with conditional
formatting and change colour. What colours do you want and in what
circumstances?

Mike

"Noddy2011" wrote:

My formula is =IF(AND(0<J3,J3<6),J3+1,"6") but when i use sum to add the
cells together is doesn't count any cell with "6" in. Why is this and how do
i change this please.



All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com