Previous page | 1 | Next page
Facebook  

formula

Last Update: 3/26/2020 10:54 PM
Author
Print | Email Notification    
Post: 2,281
Registered in: 3/21/2008
Location: LOCATE VARESINO
Age: 72
Veteran User
2007 / 13
OFFLINE
3/25/2020 3:40 PM
 
Modify
 
Delete
 
Quote

riciao

in attesa de COVID19 una semplice modifica alla UDF per non scrivere piu' anche se trasciniamo piu' oltre le combinazioni
da sostituire a quella di prima


Option Explicit
Public Function Accoppia(ByVal Ncelle As Range, ByVal Nsec As Long) As String
Dim i As Long, o As Long
Dim celle() As String
Dim conta As Long
Dim N_celle As Variant
Dim Stringa As String
Dim A1 As String, A2 As String
conta = 0
Stringa = ""
For Each N_celle In Ncelle
Stringa = Stringa & N_celle & " "
Next
celle = Split(Trim(Stringa), " ")
If Nsec > Application.Combin(UBound(celle) + 1, 2) Then
Accoppia = ""
Exit Function
End If
For i = LBound(celle) To UBound(celle)
A1 = celle(i)
For o = i + 1 To UBound(celle)
A2 = celle(o)
conta = conta + 1
If conta >= Nsec Then GoTo fine
Next o
Next i
fine:
Accoppia = A1 & "_" & A2
End Function


Ciao da locate
excel 2007 / 13
Admin Thread: | Close | Move | Delete | Modify | Email Notification Previous page | 1 | Next page
New Thread
 | 
Reply
Cerca nel forum
Tag discussione
Discussioni Simili   [vedi tutte]
Ordinare una colonna di numeri (5 posts, agg.: 1/27/2016 10:59 PM)
Tabella (15 posts, agg.: 8/28/2018 3:23 PM)
formula (4 posts, agg.: 1/4/2017 8:22 PM)
formula se (3 posts, agg.: 3/22/2017 7:07 PM)
formula (3 posts, agg.: 4/11/2017 10:54 AM)
Formula (1 post, agg.: 7/4/2017 4:19 PM)
Home Forum | Bacheca | Album | Users | Search | Log In | Register | Admin
Tutti gli orari sono GMT+01:00. Adesso sono le 11:55 PM. : Printable | Mobile | Regolamento | Privacy
FreeForumZone [v.5.1] - Copyright © 2000-2020 FFZ srl - www.freeforumzone.com