Help with formula related to IF function

Samuel14

New Member
Joined
Feb 20, 2024
Messages
2
Office Version
  1. 365
I am trying to display a value in a cell based on the contents of a range of cells and I need some help. I am essentially trying to get a cell to display a "P" if any single cell in a range of cells contains the word "Orange".

I have tried using the IF function via the following formula:

=IF($G22:$I22="Orange","P")

This does work to a point. The cell that the formula is in displays a "P" if there is a cell that contains "Orange". However, it also generates a cell next to it that says "False" for every cell in that range that does not contain "Orange". I only want the cell to display a single "P" if one or more of the cells in the search range say "Orange" and nothing else.

Any help is much appreciated!
 

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
Maybe something like this:
Excel Formula:
=IF(COUNTIF($G22:$I22,"Orange"),"P","")
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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