If statement help

  • Thread starter Thread starter Morlin
  • Start date Start date
M

Morlin

I am trying to work something out with an "IF" statement.

=IF(D2<E2,"40","")

What I'm trying to make it do is that if D2 is less than E2 I want it
to put the value already in E2 in the new cell instead of 40.

What do i put in the second "" to make it list the E2 number?

I apologize if this is simple but I am trying to teach myself this
stuff and am having problems.
 
Morlin said:
I am trying to work something out with an "IF" statement.
=IF(D2<E2,"40","")

First, I suspect that should be:

=if(D2<E2, 40, "")

"40" with quotes is text, whereas 40 without quote is a number. Of course,
you might intend the text "40"; but that is unusual.

What I'm trying to make it do is that if D2 is less than E2 I want
it to put the value already in E2 in the new cell instead of 40.
What do i put in the second "" to make it list the E2 number?

If I understand you correctly:

=if(D2<E2, E2, "")

Alternatively, perhaps the formula you are looking for is:

=if(D2<E2, E2, 40)

That returns 40 if D2 is not less than E2. I'm not sure of your intentions.


----- original message ------
 

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

Back
Top