Display number only if entered in a cell

J

JW

Hi,

I am trying to display data with a IF function saying, that if greater than
0 then display this formula, if false then show " ". However, I need to
display the number 0 if enterd in the cell as it is combined with other cells
showing a cumulative number.

=IF('Page 2'!K20+'Page 2'!L20>0;'Page 2'!K20+'Page 2'!L20;" ")

How do if use the IF function to show data ONLY if it has been entered in a
cell and can of course be the no. 0.

Jacob
 
L

Luke M

Sounds like you want to check to make sure a number has been entered.

=IF(AND(ISNUMBER('Page 2'!K20),ISNUMBER('Page 2'!L20),'Page 2'!K20+'Page
2'!L20>0),'Page 2'!K20+'Page 2'!L20,"")
 
T

T. Valko

=IF(AND(COUNT('Page 2'!K20:L20)=2,'Page 2'!K20+'Page 2'!L20>0),'Page
2'!K20+'Page 2'!L20,"")
 
J

JW

Thank you for the below. It was in the ball park, but I had to play with it a
litte. I came up with:
=IF(AND(ISNUMBER('Page 2'!K20);ISNUMBER('Page 2'!L20);'Page 2'!K20+'Page
2'!L20<" ");'Page 2'!K20+'Page 2'!L20;"")

The.....L20<" "......seemed to make the formula work? Anyways, thanks for
your speedily reply.

Luke M said:
Sounds like you want to check to make sure a number has been entered.
=IF(AND(ISNUMBER('Page 2'!K20),ISNUMBER('Page 2'!L20),'Page 2'!K20+'Page
2'!L20>0),'Page 2'!K20+'Page 2'!L20,"")
 
T

T. Valko

I'm curious...

'Page 2'!K20+'Page 2'!L20<" "

What is the logic you're testing for in that expression?

Here's what that means in "Excelese":

If the sum of K20 + L20 is less than a space character...

And in Excel, that will *always* be TRUE as long as K20+L20 returns *any*
number.

To see how that works try these formulas:

=0<" "
=10000000000<" "

Both will return TRUE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top