Find if specific values are on the same line

Cypress

New Member
Joined
Jun 22, 2019
Messages
2
Hello everyone.
I am new to Mr.excel. I hope I will make myself clear of what I need to do.
I have a sheet of numbers and I need to find if 4 specific numbers are on the same line.
For example if “1” and “23” and “54” and “132” are on the same line I need to get informed somehow. f.e. make the whole line red or something like that.
Obviously, I need to check the whole sheet for any occurrences.
Thank you in advance.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
are on the same line I need to get informed somehow. f.e. make the whole line red or something like that.
You can try, select range and put formula in Conditional Formatting
Code:
=COUNTIF($A2:$H2,$M$2)+COUNTIF($A2:$H2,$N$2)+COUNTIF($A2:$H2,$O$2)+COUNTIF($A2:$H2,$P$2)=4
or
Code:
=SUMPRODUCT((($A2:$H2=$M$2)+($A2:$H2=$N$2)+($A2:$H2=$O$2)+($A2:$H2=$P$2)))=4

Row/ColABCDEFGHIJKLMNOP
1Num1Num2Num3Num4Num5Num6Num7Num8CountifSumproductCriteria1Criteria2Criteria3Criteria4
212233554124132TRUETRUE12354132
314147854132200FALSEFALSE
4711472354132200TRUETRUE
5451472354132200FALSEFALSE
6
7

<tbody>
</tbody>
 
Last edited:
Upvote 0
I tried the first solution you suggested. IFCOUNT
It worked perfectly.
Thank you very much for your quick response.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,530
Members
448,969
Latest member
mirek8991

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