Rank function with if statement

ExcelNovice

Well-known Member
Joined
May 12, 2002
Messages
583
I'm trying to use the Rank function with if statement but without success.
Here is the formula:
=IF(OR(BF36="Tea",BF36="Cho"),"ignore",RANK(BE36,$BE$9:$BE$486,1))
Any help fixing the formula would be great, thanks.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
What was without success? Looks fine to me :unsure:
 
Upvote 0
The if statement seems to have no effect on the result. The Rank function works as expected, but the if statement conditions does not impact the results, so even when BF36 is Tea, the rank is shown instead of the word "ignore".
 
Upvote 0
Hi,

What Exactly is in BF36, is it just the word "Tea" or "Green Tea", or some other combination?
Is BF36 manually entered or from formula, if formula, what's the formula?
In an unused cell, what does =BF36="Tea" return, TRUE/FALSE?
In an unused cell, what does =LEN(BF36) return?
 
Upvote 0
B36 is a Vlookup formula showing the word "Tea", however the formula doesn't work when I replaced the Vlookup formula with the word Tea.
=BF36="Tea" return, FALSE
=LEN(BF36) return 4
 
Upvote 0
Ok, so obviously, BF36 (or B36, as you've changed it) is not "Tea"
What's your VLOOKUP formula?
and what's in the VLOOKUP result cell, where does That value come from?
I'm just trying to dig into the root of the problem, we don't have to, just my preference...

There are ways to bypass the problem, but we wouldn't know where the problem started...
 
Upvote 0
Ok, so obviously, BF36 (or B36, as you've changed it) is not "Tea"
What's your VLOOKUP formula?
and what's in the VLOOKUP result cell, where does That value come from?
I'm just trying to dig into the root of the problem, we don't have to, just my preference...

There are ways to bypass the problem, but we wouldn't know where the problem started...
Thanks, but the problem can't be the Vlookup formula, because the Rank formula still doesn't work after replacing the Vlookup formula with the text Tea entered in cell B36.
In other words the Rank formula with the if statement still doesn't work even without the Vlookup formula.
 
Upvote 0
Hmm, that's why I wanted to find out what's in the result cell of the VLOOKUP formula
Also, are you doing VLOOKUP B6 to BF36?
 
Upvote 0
Again I was just trying to help finding where the problem started, without such, may be we can just by-pass it like this:

Excel Formula:
=IF(SUM(COUNTIF(BF36,{"*tea*","*cho*"})),"ignore",RANK(BE36,$BE$9:$BE$486,1))
 
Upvote 0
Solution

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

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