f(x) = TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)
첫번째 MS 보다 두번째 오빠두 모듈이 범위를 지정할 수 있어 효과적임.
1. Open a blank workbook
2. Press ALT+F11 to open the VBA editor
3. In the Project window on the left, right-click on the workbook name and choose Insert ->Module
4. Paste this code in the resultant window
5. Enter the code: from the Microsoft version below or the code from the Oppadu version below
6. Save the workbook as an add-in type (.xlam)
7. Load the add-in into Excel (File ->Options ->Addins)
8. to use : = textjoin("",true,e3:g3)
Microsoft version
Option Explicit
Function TEXTJOIN(delimiter As String, ignore_empty As String, ParamArray textn() As Variant) As String
Dim i As Long
For i = LBound(textn) To UBound(textn) - 1
If Len(textn(i)) = 0 Then
If Not ignore_empty = True Then
TEXTJOIN = TEXTJOIN & textn(i) & delimiter
End If
Else
TEXTJOIN = TEXTJOIN & textn(i) & delimiter
End If
Next
TEXTJOIN = TEXTJOIN & textn(UBound(textn))
End Function
Can I get a textjoin() add-in for 2013
Can I get a textjoin() add-in for 2013. I purchased my PC last fall and it is running excel 2013 and I really do not want to spend more money for just one application.
answers.microsoft.com
Oppadu version
Public Function TEXTJOIN(ByVal delimiter As String, _
ByVal ignore_empty As Boolean, _
ParamArray vaRngs() As Variant)
'#######################################################
'오빠두엑셀 VBA 사용자 지정함수 (https://www.oppadu.com/VBA-TEXTJOIN-함수)
'■ TEXTJOIN 명령문
'■ TEXTJOIN 함수를 지원하지 않는 엑셀 2016 이전 버전 사용자를 위한 사용자지정함수입니다.
'■ 범위안의 각 셀을 구분자로 분리하여 긴 문자열로 병합합니다.
'■ 인수 설명
'_____________delimiter : 각 셀을 구분할 구분자입니다.
'_____________ignore_empty : 빈 셀이 있을경우 무시할지 여부입니다.
'_____________rng :병합할 범위입니다.
'■ 사용된 기타 사용자지정함수
'■ 그외 참고사항
'#######################################################
Dim vaRng As Variant
Dim Rng As Variant
Dim strResult As String
For Each vaRng In vaRngs
For Each Rng In vaRng
If ignore_empty = True Then
If Rng <> "" Then strResult = strResult & Rng & delimiter
Else
strResult = strResult & Rng & delimiter
End If
Next
Next
strResult = Left(strResult, Len(strResult) - Len(delimiter))
TEXTJOIN = strResult
End Function
엑셀 TEXTJOIN 함수 (엑셀 2016 이전 버전 사용자용) - 오빠두엑셀
엑셀 TEXTJOIN 함수 (2016 이전버전 사용자용) 함수 구문 = TEXTJOIN (구분자, 빈칸무시, 범위) 사용된 인수 TEXTJOIN 함수에는 3개의 인수가 사용됩니다. 구분자 : 각 셀을 나눌 구분자입니다. (예: ", " 또는
www.oppadu.com
'excel' 카테고리의 다른 글
=myRGB(r,g,b) (0) | 2025.01.24 |
---|---|
엑셀에서 문자 개수 세기 (0) | 2024.08.07 |
조건합 SUMIF (0) | 2023.07.05 |
엑셀에서 오늘 날짜 입력 단축키: CTRL + ; (1) | 2023.06.22 |
f(x) = MID(text, start_num, num_chars) (0) | 2021.04.08 |