Look for multiple values in a range and decide by if function what the result is, if these values are found.

Bossie

New Member
Joined
Jun 5, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there,

What I'm trying to achieve is to show some text in column W, if the previous columns in the same row contain 1 or more certain values.
If i try this formula for 1 value, there is no problem, but when I look for multiple values I fail.

I'm guessing that using an array formula could be a solution? If so, I keep struggling to make this work..


Define comp. name.PNG
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
What values do you want to look for, where do you want to look for them, and what should the results be for each value found?

From your screen capture and attempted formula, my best guess would be the following, which you will need to array confirm with Ctrl Shift Enter.

=IF(OR(N2:V2={125\128\138});"Company1";"Company2")
 
Upvote 0
Maybe
=IF(SUM(COUNTIFS(N2:V2,{125,128,138})),"Company1","Company2")
 
Upvote 0
What values do you want to look for, where do you want to look for them, and what should the results be for each value found?

From your screen capture and attempted formula, my best guess would be the following, which you will need to array confirm with Ctrl Shift Enter.

=IF(OR(N2:V2={125\128\138});"Company1";"Company2")
Maybe
=IF(SUM(COUNTIFS(N2:V2,{125,128,138})),"Company1","Company2")

Both work perfect as a solution for the question I raised, thanks guys!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,963
Members
449,200
Latest member
indiansth

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