Disallowing Triplicates

Oct 13, 2007

I'm a teacher and I'm trying to set up a monitoring system for students leaving and reentering the class. Some of them need very close monitoring and restricted privileges.

I've managed to get everything I need working except restricting the amounts of time they can leave. I've been experimenting with Validation lists but running into snags. The VBA code below seemed promising:

Private Sub Worksheet_Change(ByVal Target As Range)
With WorksheetFunction
If .CountIf(Range("C1:C" & Target.Row), Target.Value) > 1 And Target.Column = 3 Then
MsgBox "You Have Already Left XXX Times"
Target.Value = ""
End If
End With
End Sub.......

View 9 Replies


ADVERTISEMENT

Find Duplicates / Triplicates Or More And Combine Cell Value Of Next Cells

Aug 12, 2014

I want a VBA that searches for duplicates, triplicates, or more and combine the cellvalue that is next to the duplicates. Also, if it combines them, it should only use the last letter. I have a code that works partially, but I'm stuck.

For example, I have this list:

1
2014A

2
2014B

3
2014C

1
2014D

4
2014E

1
2014F

I want it to combine the A, D and F like this:

1
2014A

1
A/D/F

2
2014B

[Code] .......

I created the following script, but i can't get it to use the last letter. Also it creates a " / / " when the cells are empty.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved