Conditional Statement Producing an Incorrect Value

VUProf

New Member
Joined
Jun 11, 2019
Messages
9
I'm no Excel expert -- so forgive me if I use the incorrect terminology.

In a report I've created using Excel, there is a cell that is to produce a conditional value. The formula I've written for the cell is as follows:

=IF(CalcSheet!F58>1,"low agr",IF(CalcSheet!F58>=0.6,"mod agr","high agr"))

The cell from which the value is created (CalcSheet!F58) has a formula in it that replaces errors with an empty cell. The formula is as follows:
=IFERROR((RaterGroups!AD10),"")

The cell that produces the values of "low agr", "mod agr", or "high agr" is producing a value of "low agr" when CalcSheet!F58 is an empty cell. I don't want it to do that. Ideally, I want it to produce an empty cell itself. Alternatively (though a bit less desirable) would be for the cell to produce an error message -- but "low agr" is NOT appropriate.

Any suggestions on how to add to my conditional statement such that it will produce an empty cell when the cell value it is drawing upon is an empty cell? Thanks so much!

Daniel
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi & wlecome to MrExcel
How about
=IF(Calcsheet!F58="","",IF(Calcsheet!F58>1,"low agr",IF(Calcsheet!F58>=0.6,"mod agr","high agr")))
 
Last edited:
Upvote 0
Hi & wlecome to MrExcel
How about
=IF(Calcsheet!F58="","",IF(Calcsheet!F58>1,"low agr",IF(Calcsheet!F58>=0.6,"mod agr","high agr")))

That did the trick! I wasn't aware of the "," thing -- is that how you create an empty cell from an "empty cell" that is actually the removal of an error term?
 
Upvote 0
G'day VUP,

You seem to have slightly misunderstood the components of the formula - whilst "," can be a way to add a text comma, that is not what is being done in the formula Fluff provided.

If you look carefully you will note that the formula is actually ...="","",IF... which is saying: if F58 is blank (i.e. =""), then blank the cell containing the formula (the second set of double quotes after the comma) otherwise go through the filter process to display the correct message.

Cheers

shane
 
Last edited:
Upvote 0
G'day VUP,

You seem to have slightly misunderstood the components of the formula - whilst "," can be a way to add a text comma, that is not what is being done in the formula Fluff provided.

If you look carefully you will note that the formula is actually ...="","",IF... which is saying: if F58 is blank (i.e. =""), then blank the cell containing the formula (the second set of double quotes after the comma) otherwise go through the filter process to display the correct message.

Cheers

shane


Got it! Thank you for the explanation.
 
Upvote 0
if F58 is blank (i.e. =""),
Just to point out that the above statement is incorrect. "" is an empty string not a blank, doing the test as Fluff has written it will return an empty string for both an empty string and a blank cell but the original formula would have returned "high agr" and not "low agr" if the cell was actually a blank cell (it was seeing the empty string as text).
 
Upvote 0
You're welcome,

Excel is full of nuances and subtleties that make it the incredibly versatile application that it is.

Cheers
 
Upvote 0
Thanks for the correction Mark, I probably knew that once, but lost it in the clutter.
 
Upvote 0
Thanks for the correction Mark, I probably knew that once, but lost it in the clutter.

You're welcome, it is an important difference if you ever use Specialcells - blanks (either manually or via VBA) as it only recognizes genuine blank cells.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

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