메인 컨텐츠로 가기

확인란을 Excel의 여러 셀에 연결하는 방법은 무엇입니까?

확인란을 여러 상대 셀에 연결하면 선택되거나 선택되지 않은 셀만 합산, 계산 또는 평균화해야 할 때 일부 계산을 빠르고 쉽게 수행 할 수 있습니다. 그러나 워크 시트에서 한 번에 여러 셀에 확인란을 연결해 본 적이 있습니까?

수식을 사용하여 확인란을 여러 셀에 하나씩 연결

VBA 코드를 사용하여 한 번에 여러 셀에 확인란 연결


화살표 블루 오른쪽 거품 수식을 사용하여 확인란을 여러 셀에 하나씩 연결

확인란을 특정 셀에 연결하려면 실제로 간단한 수식을 적용하여 수동으로 연결할 수 있습니다.

1. 워크 시트에 체크 박스를 삽입 한 후 체크 박스를 선택하려면 Ctrl 키 키를 누른 다음 다른 셀에 연결하려는 첫 번째 확인란을 클릭합니다.

2. 그런 다음 수식 입력 줄에 등호를 입력합니다. =을 클릭 한 다음 확인란을 연결하려는 셀 (예 : B2)을 클릭합니다. 스크린 샷 참조 :

문서 링크-다중-체크박스-1

3. 그런 다음 엔터 버튼 키보드의 키를 누르면이 확인란을 선택하면 연결된 셀이 표시됩니다. TRUE, 체크를 해제하면 표시됩니다. 그릇된, 스크린 샷 참조 :

문서 링크-다중-체크박스-2

4. 위의 단계를 반복하여 다른 확인란을 하나씩 연결했습니다.


화살표 블루 오른쪽 거품 VBA 코드를 사용하여 한 번에 여러 셀에 확인란 연결

수백, 수천 개의 확인란을 다른 셀에 연결해야하는 경우 첫 번째 방법이 효과적으로 작동하지 않으므로 한 번에 여러 셀에 연결하려면 다음 VBA 코드를 적용 할 수 있습니다. 다음과 같이하십시오 :

1. 체크 박스 목록이있는 워크 시트로 이동합니다.

2. 누르고 ALT + F11 키를 눌러 Microsoft Visual Basic for Applications 창.

3. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭하고 다음 코드를 모듈 창.

VBA 코드 : 확인란을 한 번에 여러 셀에 연결

Sub LinkChecks()
'Update by Extendoffice
Dim xCB
Dim xCChar
i = 2
xCChar = "B"
For Each xCB In ActiveSheet.CheckBoxes
If xCB.Value = 1 Then
    Cells(i, xCChar).Value = True
Else
    Cells(i, xCChar).Value = False
End If
xCB.LinkedCell = Cells(i, xCChar).Address
i = i + 1
Next xCB
End Sub

4. 그런 다음 F5 이 코드를 실행하려면 활성 워크 시트의 모든 확인란이 셀에 연결되어 있습니다. 확인란을 선택하면 관련 셀이 표시됩니다. TRUE, 확인란의 선택을 취소하면 연결된 셀에 그릇된, 스크린 샷 참조 :

문서 링크-다중-체크박스-3

주의 사항: 위 코드에서 I = 2, 수 2 체크 박스의 시작 행이고 B 확인란을 링크해야하는 열 위치입니다. 필요에 따라 변경할 수 있습니다.


관련 기사 :

Excel에서 단일 확인란을 사용하여 모든 확인란을 선택하는 방법은 무엇입니까?

Excel에서 여러 확인란을 빠르게 삽입하는 방법은 무엇입니까?

Excel에서 여러 확인란을 빠르게 삭제하는 방법은 무엇입니까?

최고의 사무 생산성 도구

인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel 기술을 강화하세요 Kutools for Excel, 이전과는 전혀 다른 효율성을 경험해 보세요. Kutools for Excel 생산성을 높이고 시간을 절약할 수 있는 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

kte 탭 201905


Office Tab Office에 탭 인터페이스를 제공하고 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Will this work when I try to sort Alphabetically? I've found that when I sort from A-Z, the check boxes do not follow the cells they were originally next to. Will your method help? Thank you!
This comment was minimized by the moderator on the site
My problem is: I am creating a to do list with daily habits. I want to be able to make statistics from it using the true and false from checking the box linked to a cell but do not want to individually do it, but when i use the code nothing happens?
This comment was minimized by the moderator on the site
Hello, Gregor,
The VBA code works well in my workbook.
You can upload your file here, so that we can check where the problem is.
Thank you!
This comment was minimized by the moderator on the site
Здравствуйте.
Подскажите. Возможно ли суммирование чисел в ячейках по установке флажка?

https://drive.google.com/file/d/1qmEnngPDdgWTISJETJ44IkxG-MABfqhh/view?usp=sharing[/img][/b][/u][/b

В ячейке F3 скрыто число 2 а в ячейке G3 скрыто число 0,3, можно ли сделать так чтоб при установки галочки в ячейке Q3 вычислялась сумма.
Сумма вычислений только на строку в диапазоне F3-P3
This comment was minimized by the moderator on the site
great thread and it works for me.
BUT, I need to save the TRUE/FALSE data to another sheet. What is the VBA to save it to another sheet other than the active one?
This comment was minimized by the moderator on the site
How about if you have some empty rows in ColumnA (as per your example) in between checkboxes? Using the above code it gets the linked cells wrong if there are empty rows because it does not skip them. Interested to see the solution
This comment was minimized by the moderator on the site
Did u find any solution for this? Same problem
This comment was minimized by the moderator on the site
Sub LinkCheckBoxes()

Dim chk As CheckBox

Dim lCol As Long

lCol = 1 'number of columns to the right for link



For Each chk In ActiveSheet.CheckBoxes

With chk

.LinkedCell = _

.TopLeftCell.Offset(0, lCol).Address

End With

Next chk



End Sub
This comment was minimized by the moderator on the site
Hello! Nice post about the VBA... but what if there are 3 columns that has checkboxes that needs to be linked in three other columns as well? Let's say columns B, C, and D has checkboxes and should be linked to columns H, I, and J respectively.
This comment was minimized by the moderator on the site
Hi, Having same problem - Have you found out how to get around this? Thanks, Paul
This comment was minimized by the moderator on the site
Hey,

Try this:

Sub LinkCheckBoxes()
Dim chk As CheckBox
Dim lCol As Long
lCol = 2 'number of columns to the right for link

For Each chk In ActiveSheet.CheckBoxes
With chk
.LinkedCell = _
.TopLeftCell.Offset(0, lCol).Address
End With
Next chk

End Sub



If you have for example, checkboxes in D,E,F change "Icol" to 1, so it links to G,H and I, respectively.
This comment was minimized by the moderator on the site
Hi, I have the same issue but did not work for me, can you help please.Thanks
This comment was minimized by the moderator on the site
thank you very much
This comment was minimized by the moderator on the site
Can you help me out with this same problem?
This comment was minimized by the moderator on the site
Can I do this and program the boxes to say something other than true and false?
This comment was minimized by the moderator on the site
Hi, In your VBA code: link checkboxes to multiple cells at once, the code is set up to link the cell below it. How is the code if I want to link the cell to the left of the first one? Thanks!
This comment was minimized by the moderator on the site
i have more than 40000 cell which have checkbox. when i use this code, it takes more than 5 second to process, i define different macros for different cells but i have still the problem, what can i do?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations