Formula to check if Cells contain 3 given texts

VPLUMWOOD

New Member
Joined
Jul 13, 2021
Messages
41
Office Version
  1. 365
Im organising a training day where staff have 11 workshops to choose from,

They have all chosen their top 3 so I have allocated them a Session 1, Session 2 and Session 3 choice.

I want a formula at the end that tells me if Session1, Session2 and Session3 are included in the range D2:H2 so I can make sure I haven't accidentally assigned anyone Session1, Session1, Session3 etc i.e. 2 sessions with the same number. The rows wont always be in order i.e. might have session2, session1, session 3 but all together all 3 are there.

Any ideas?

ShortMapplewellSession2MusicSession3ArtSession1DT
GregoryHoyland CommonSession1EYFSSession2MFLSession3Art
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi , welcome,

this one might be a little convoluted, but see if it works for you
Excel Formula:
=IF(COUNTIF(D6:H6,D6) + COUNTIF(D6:H6,F6) + COUNTIF(D6:H6,H6)>3,"Duplicate","OK")
 
Upvote 0
Hello,

Is this what you are looking for ??

Book3
ABCDEFGHIJ
1ShortMapplewellSession2MusicSession3ArtSession1DTFormula
2GregoryHoyland CommonSession1EYFSSession3MFLSession3ArtDuplicate Session
Sheet1
Cell Formulas
RangeFormula
J2J2=IF(OR(C2=E2,C2=G2,E2=G2),"Duplicate Session","All OK")
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGHI
1
2ShortMapplewellSession2MusicSession3ArtSession2DTDuplicate
3GregoryHoyland CommonSession1EYFSSession2MFLSession3ArtOk
Data
Cell Formulas
RangeFormula
I2:I3I2=IF(SUM(COUNTIFS(C2:H2,INDEX(C2:H2,{1,3,5})))>3,"Duplicate","Ok")
 
Upvote 0
These all say OK but when I've changed one so there is a duplicate to test it still showed OK?
 
Upvote 0
These all say OK but when I've changed one so there is a duplicate to test it still showed OK?
Did you try this ?? make sure to change the range as per your original data
Excel Formula:
=IF(OR(C2=E2,C2=G2,E2=G2),"Duplicate Session","All OK")
 
Upvote 0
can you share your sheet so we can see / try to understand whats happening please ?

Rob
 
Upvote 0

Forum statistics

Threads
1,221,547
Messages
6,160,456
Members
451,647
Latest member
Tdeulkar

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