Nueva función «UNICOS»

%3CLINGO-SUB%20id%3D%22lingo-sub-3441879%22%20slang%3D%22es-ES%22%3ENew%20%22UNICOS%22%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3441879%22%20slang%3D%22es-ES%22%3E%3CP%3EHello%2C%20community!%20I've%20seen%20a%20very%20useful%20new%20feature%20called%20%22UNICOS%2C%22%20but%2C%20sadly%2C%20it's%20only%20available%20for%20Office%20365.%20My%20question%20is%20this%3A%20does%20anyone%20know%20what%20the%20source%20code%20of%20this%20formula%20is%20so%20I%20can%20add%20it%20to%20my%20Excel%202019%3F%20I%20don't%20have%20office%20365.%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3441879%22%20slang%3D%22es-ES%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3442238%22%20slang%3D%22en-US%22%3ERe%3A%20Nueva%20funci%C3%B3n%20%C2%ABUNICOS%C2%BB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3442238%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1406034%22%20target%3D%22_blank%22%3E%40alonsodiego%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ESub%20unique()%0A%0ADim%20i%20As%20Integer%0ADim%20j%20As%20Integer%0ADim%20z%20As%20Integer%0A%0Az%20%3D%204%0AFor%20i%20%3D%204%20To%2018%0A%0Aj%20%3D%20Application.WorksheetFunction.CountIf(Range(Cells(4%2C%204)%2C%20Cells(i%2C%204))%2C%20Cells(i%2C%205))%0A%0AIf%20j%20%3D%201%20Then%0ACells(z%2C%206).Value%20%3D%20Cells(i%2C%204).Value%0Az%20%3D%20z%20%2B%201%0AElse%0A%0AEnd%20If%0A%0ANext%20i%0A%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAn%20alternative%20could%20be%20this%20code.%20You%20can%20click%20the%20button%20in%20cell%20I3%20in%20the%20attached%20file%20to%20start%20the%20macro.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

¡Hola, comunidad! He visto una nueva función muy útil que se llama «UNICOS», pero, lamentablemente, solo está disponible para Office 365. Mi pregunta es la siguiente: ¿alguien sabe cuál es el código fuente de esta fórmula para poder agregarla a mi Excel 2019? No tengo el Office 365.

1 Reply

@alonsodiego 

Sub unique()

Dim i As Integer
Dim j As Integer
Dim z As Integer

z = 4
For i = 4 To 18

j = Application.WorksheetFunction.CountIf(Range(Cells(4, 4), Cells(i, 4)), Cells(i, 5))

If j = 1 Then
Cells(z, 6).Value = Cells(i, 4).Value
z = z + 1
Else

End If

Next i

End Sub

An alternative could be this code. You can click the button in cell I3 in the attached file to start the macro.