formula with IF function needed

RSEKAR

Board Regular
Joined
Oct 18, 2010
Messages
172
Dear Sir,
I am a learner in Excel
I want to have a formula satisfying the following conditions.
I may have numerical data in the C column (with out formula).
In columns O and P I have formulae. I may get numerical data out of formula in both the columns (O and P).
I get “-“ in both columns O and P, If I do not get a numerical values out of formula.
In M column I write the following formula.
=IF(AND(C10<O10,(O10-P10)>C10),”PLUS”,”-“)
This formula results in error message if the columns O and P have “-“
I want to give a condition as
If O10 and P10 contain numerical values then the formula should be executed.
Kindly let me know how to get the value with out error.
I use Excel 2002 and XP
Thanking you,
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Dear Sir,
I am a learner in Excel
I want to have a formula satisfying the following conditions.
I may have numerical data in the C column (with out formula).
In columns O and P I have formulae. I may get numerical data out of formula in both the columns (O and P).
I get “-“ in both columns O and P, If I do not get a numerical values out of formula.
In M column I write the following formula.
=IF(AND(C10<O10,(O10-P10)>C10),”PLUS”,”-“)
This formula results in error message if the columns O and P have “-“
I want to give a condition as
If O10 and P10 contain numerical values then the formula should be executed.
Kindly let me know how to get the value with out error.
I use Excel 2002 and XP
Thanking you,
The IF-formula you posted seems incomplete...

Are you looking something like?...

=IF(COUNT(O10:P10)=2,Do X,Otherwise Y)

You need to specify (fill in) the bits for Do X and Otherwise Y.
 
Upvote 0
Dear Sir,
The formula typed in incomplete. The correct formula given in the M column is:
=IF(AND(C10<O10,(O10-P10)>C10),”PLUS”,”-“)
 
Upvote 0
Extremely sorry,
when i post my reply the formula is changed.
the correct formula given in the M column is:
=IF(AND(C10<O10,(O10-P10)>C10),"PLUS","-")
 
Upvote 0
Extremely sorry,
when i post my reply the formula is changed.
the correct formula given in the M column is:
=IF(AND(C10<O10,(O10-P10)>C10),"PLUS","-")

What do you have between C10 and C10? If you have the < sign somewhere, try to put extra spaces around it.
 
Upvote 0
Very sorry,
I am unable to send the correct formula.
The formula has been changed when I click "submit reply"
I try once again.
IF(AND(C10<O10,(O10-P10)>C10),"PLUS","-")
 
Upvote 0
Dear Sir,
I try to follow your advice.
=IF(AND(C10 < O10,(O10 - P10) > C10), "PLUS", "-" )
 
Upvote 0
Dear Sir,
I try to follow your advice.
=IF(AND(C10 < O10,(O10 - P10) > C10), "PLUS", "-" )

One of...

=IF(COUNT(O10:P10)=2, IF(AND(C10 < O10,(O10 - P10) > C10), "PLUS", "-" ), "-")

=IF(AND(C10 < O10,(N(O10) - N(P10)) > C10), "PLUS", "-" )
 
Upvote 0
Your second condition:

=(O10-P10)>C10

could also be written

C10<(O10-P10)

making the C10<O10 condition redundant since they both have to be true.

=IF(C10<(O10-P10),"PLUS","-")
 
Upvote 0
If I use your last formula I get once again error message in the rows in which O and P column contains "-"
The previous one
IF(AND(C10 < O10,(N(O10)-N(P10)) > C10),"PLUS","-")
is working well,
Thanking you once again.
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,451
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top