Excel 2013 Nesting IF functions???

IIA132

New Member
Joined
Jan 23, 2019
Messages
3
I am working on a Separation of Duties Form and I need a way to highlight or strike through a name if it is showing in multiple columns (Duty 1, Duty 2, Duty 3). The Form has 3 columns. The goal is if a name (Karen) is assigned in all three columns then we would like either a strike through her name in the column that creates conflict or a highlight in red indicating that the Duties assigned conflict. However, As an example, Duty 1 and Duty 3 can be assigned to the same person, but the person cannot do all three duties (which is what Karen is doing).

I wanted to send an attachment of the spreadsheet I am working on, but it seems I am unable to post attachments?

 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi,

May be something like this for CF formula rule:

=COUNTIF(A1:C1,"Karen")=3

You can change "Karen" to a cell reference if you like.
 
Upvote 0
Paste the below CODE into your Sheet Module versus a Standard Module..

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Columns("A:C")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
TR = Target.Row
MyCount = 1
Set Rng = Range(Cells(TR, 1), Cells(TR, 3))
Duty1 = Rng(1).Value
    For i = 2 To 3
        If Cells(TR, i).Value = Duty1 Then
        MyCount = MyCount + 1
        End If
    Next i
If MyCount = 3 Then
    MsgBox "You have entered " & Target.Value & " three times. Try someone Else."
Target.Value = ""
End If
Application.EnableEvents = True
End Sub



Excel 2010
ABC
Duty 1Duty 2Duty 3
KarenKaren

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]

</tbody>
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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