Hello all,
I have 8 boxes with Ranges each one,
Last five Boxes wit Ranges had the Occurrences of each string,
Occurrences where display at all the time, using this Function :
Let say in Cells G32 to E32 Its was displaying 3,4,5,3 (Cell F, G, H, J )
I Added a SortUniq Code and Formulas, But then the SortUniq didn't work with Leading zero
(In each Cell where displaying the "00", But in in the Formula bar it was showing like single digit)
I changed to custom and "00", After that stop working the occurrences
It seems that problem is with Format cells properties
then i changed the Formats Cell properties, As text, General, then Custom (using 00)
also add the apostrophe, etc,etc.. then Sortuniq not sort, and not Occurrences.. so i had to
set back to custom wit '00' but occurrences disappear.. Problem still.
Please, any suggestion?
I'm using the the following Functions :
For Occurrences
=IF(AND(COUNT(C25:C31)>3,COUNT(C25:C31)<7),COUNT(C25:C31),"")
SortUniq Function
=sortuniq("-",C16:C22,D16:D22)
If and LEN function
=IF(LEFT(AO2,1)="-",MID(AO2,2,LEN(AO2)), IF(RIGHT(AO2,1)="-",LEFT(AO2,(LEN(AO2)-1)),AO2))
SortUniq Code
Function SortUniq(delim As String, ParamArray a()) As String
Dim r As Range, e, x
With CreateObject("System.Collections.ArrayList")
For Each x In a
For Each r In x
For Each e In Split(r.Value, delim)
If Not .Contains(Trim$(e)) Then .Add Trim$(e)
Next
Next
Next
.Sort
SortUniq = Join$(.ToArray, delim)
End With
End Function
Find sample File attachment
Thank You
David
Bookmarks