Jesteś w dziale:
Gadaniec »
VHS do DVD: kopiowanie kaset vhs oraz materiału z kamer na nośnik DVD. Dowiedz się więcej »




2008-08-12 00:03:31
Dżobo
203 postów

Tworzenie nowej funkcji w excelu Concat


1. Open up a new workbook.
2. Get into VBA (Press Alt+F11)
3. Insert a new module (Insert > Module)
4. - Copy and Paste the Excel user defined function examples -
5. Get out of VBA (Press Alt+Q)
6. Use the functions (They will appear in the Paste Function dialog box, Shift+F3, under the "User Defined" category)


Function Concat(myRange As Range, Optional myDelimiter As String)
Dim r As Range

Application.Volatile
For Each r In myRange
Concat = Concat & r & myDelimiter
Next r
If Len(myDelimiter) > 0 Then
Concat = Left(Concat, Len(Concat) - Len(myDelimiter))
End If
End Function






=CONCAT(C8:E10)
=CONCAT(C8:E10,"|")




Function Concat(myRange As Range, Optional myDelimiter As String)
Dim r As Range

Application.Volatile
For Each r In myRange
If Len(r.Text) > 0 Then
Concat = Concat & r & myDelimiter
End If
Next r
If Len(myDelimiter) > 0 Then
Concat = Left(Concat, Len(Concat) - Len(myDelimiter))
End If
End Function



Źródło: http://exceltips.vitalnews.com/Pages/T003062_Concatenating_Ranges_of_Cells.html


 

 
STRONA GŁÓWNA . AKTUALNOŚCI . FORUM . ROZRYWKA . GALERIA . VIDEO . KLIKACZ . KONTAKT   All Rights Reserved  Grzesio.eu © ® 2002-2012.
Zaprojektował: Grzegorz Mistewicz