메인 컨텐츠로 가기

Excel의 셀 범위에서 굵은 숫자를 합산 / 계산하는 방법은 무엇입니까?

저자: 샤오양 최종 수정 날짜: 2022-05-16

워크 시트에 굵은 숫자가 포함 된 데이터 범위가 있고 이제 굵은 셀만 합산하거나 계산하려는 경우에는 물론 수동으로 하나씩 추가 할 수 있지만 시간이 많이 걸립니다. 쉽고 빠른 방법으로 Excel에서 굵은 셀만 합산하거나 계산하는 방법은 무엇입니까?

사용자 정의 함수 (VBA 및 수식)를 사용하여 범위에서 굵은 숫자 계산
사용자 정의 함수 (VBA 및 수식)를 사용하여 범위의 굵은 숫자 합계
Excel 용 Kutools를 사용하여 범위의 굵은 셀을 여러 번 클릭하여 계산


사용자 정의 함수를 사용하여 범위에서 굵은 숫자 계산

다음 사용자 정의 기능 굵은 셀 수를 빠르게 얻을 수 있습니다. 다음과 같이하십시오 :

1. 누르고 ALT + F11 키가 열립니다. Microsoft Visual Basic for Applications 창.

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

VBA 코드 : 셀 범위에서 굵은 숫자 계산

Function CountBold(WorkRng As Range)
'Update 20220516
Dim Rng As Range
Dim xCount As Double
For Each Rng In WorkRng
    If Rng.Font.Bold Then
        xCount = xCount + 1
    End If
Next
CountBold = xCount
End Function

3. 그런 다음이 코드를 저장하고이 수식을 입력합니다. = CountBold (A1 : C9) 빈 셀에 넣으려면 스크린 샷을 참조하십시오.

doc-count-bold-cells1

4. 그런 다음 엔터 버튼 키를 누르고 A1 : C9 범위의 굵은 셀을 계산합니다.

doc-count-bold-cells2

참고 :A1 : C9 수식에서 굵은 셀을 계산하는 기능을 사용하려는 범위를 나타내며 필요에 따라 변경할 수 있습니다.


사용자 정의 함수를 사용하여 범위의 굵은 숫자 합계

데이터 범위에서 굵은 숫자 만 합산하려면 문제를 해결할 수있는 사용자 정의 함수를 만들 수도 있습니다.

1. 누르고있어. ALT + F11 키가 열립니다. Microsoft Visual Basic for Applications 창.

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

VBA 코드 : 셀 범위의 굵은 숫자 합계

Function SumBold(WorkRng As Range)
'Update 20220516
Dim Rng As Range
Dim xSum As Double
For Each Rng In WorkRng
    If Rng.Font.Bold Then
        xSum = xSum + Rng.Value
    End If
Next
SumBold = xSum
End Function

3. 그런 다음이 코드를 저장하고이 수식을 입력합니다. = sumbold (A1 : C9) 빈 셀에 넣으려면 스크린 샷을 참조하십시오.

doc-count-bold-cells3

4. 그런 다음 엔터 버튼 키, A1 : C9 범위의 모든 굵은 숫자가 추가되었습니다. 스크린 샷보기 :

doc-count-bold-cells4

참고 :A1 : C9 수식에서 굵은 셀을 합산하는 함수를 사용하려는 범위를 나타내며 필요에 따라 변경할 수 있습니다.


Excel 용 Kutools를 사용하여 범위의 굵은 셀을 여러 번 클릭하여 계산

Y복잡한 VBA 코드를 처리하고 수식을 기억하지 않고도 몇 번의 클릭만으로 범위의 모든 굵은 셀을 쉽게 계산하거나 합산 할 수 있습니다.

신청하기 전에 Excel 용 Kutools, 제발 먼저 다운로드하여 설치하십시오..

1. 굵은 셀을 계산하려면 결과를 찾을 빈 셀을 선택한 다음 쿠툴 > Kutools 기능 > 통계 및 수학 > COUNTBYFONTbold.

굵은 셀을 합산하려면 쿠툴 > Kutools 기능 > 통계 및 수학 > 섬비폰트볼드. 스크린 샷보기 :

2. F에서unction 인수 대화 상자에서 계산하거나 합계해야하는 굵은 셀로 범위를 참조 상자에 지정한 다음 OK 버튼을 클릭합니다.

이제 지정된 범위의 모든 굵은 셀의 계산 또는 합계가 선택한 셀에 즉시 채워집니다. 스크린 샷보기 :

  이 유틸리티의 무료 평가판 (30 일)을 받으려면 그것을 다운로드하려면 클릭하십시오을 클릭 한 다음 위 단계에 따라 작업 적용으로 이동합니다.


Kutools for Excel로 수식 셀 참조를 일정하게 유지


관련 기사:

Excel에서 모든 굵은 셀 또는 텍스트를 식별하고 선택하는 방법은 무엇입니까?

최고의 사무 생산성 도구

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

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

상품 설명


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

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (22)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello Anthony,
I was struggling with the same problem. For me, the solution ended up being very simple. I noticed I had 4 Modules listed. I removed all of them and then started over with the above instructions. Now it works perfectly.
This comment was minimized by the moderator on the site
I use the function and keep getting the #NAME? error. I am using Excel 365 and Windows11.
This comment was minimized by the moderator on the site
Hello, Anthony

Have you copied and pasted the code into the Module of Microsoft Visual Basic for Applications window in your worksheet? Afetr pasting the code, then, you should enter the formula as you need.

Or you can upload your file here, we can check where the problem is.

Thank you!
This comment was minimized by the moderator on the site
Ma se metto in grassetto nuove celle, la somma non si aggiorna !!!
This comment was minimized by the moderator on the site
Hello Carlo,

Gald to help. After you bold new cells, the sum won't update automatically. But when you double-click the formula cell, then press Enter, the sum will update. Please have a try.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
Hi Mandy,
thanks for your reply,
Yes I know that after double click the sum will uograde.
Is there any way to upgrade automatically the sum ?

Regards
Carlo
This comment was minimized by the moderator on the site
Hello Carlo,

Sorry that I don't have the solution for automatically upgrading the sum. The easiest way I can think of is to press Ctrl + Alt + F9 to recalculate all worksheets in all open workbooks. Have a nice day.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
А если в ячейках числа и текст? надо просуммировать только ячейки с числами жирным шрифтом.
This comment was minimized by the moderator on the site
RE: CountBold formula This formula does not appear to be dynamic. While it works at first pass, if i change the bolded cells the counters do not update unless i re-enter the formula again. Any tips?
This comment was minimized by the moderator on the site
Yea this is the same for me, otherwise it works great. But if this could be solved so it refreshes the count after each cell deselect like other basic counts it would be perfect!
This comment was minimized by the moderator on the site
Dear guys,
The formula won't update if you just change the format of the number cells.
It updates only when you change the cell content.
This comment was minimized by the moderator on the site
I'm using excel for mac 2011. How can I run the code on my system? thanks!
This comment was minimized by the moderator on the site
I copied and pasted code into excel but get #NAME? error. I made sure to enable macros and using excel 2010 version (don't know if that changes anything). Can anyone please help?!
This comment was minimized by the moderator on the site
[quote]I copied and pasted code into excel but get #NAME? error. I made sure to enable macros and using excel 2010 version (don't know if that changes anything). Can anyone please help?!By Maey[/quote] You have to follow the instruction. It says: "Click Insert > Module, and paste the following code in the Module Window", and you have to do exactly so. Make sure you paste the code in the Module Window, not in the Sheet code Window.
This comment was minimized by the moderator on the site
Thank you.. it's working...
This comment was minimized by the moderator on the site
This works a treat. I only have one issue...it doesn't seem to be adding anything after a decimal point. Any help would be greatly appreciated.
This comment was minimized by the moderator on the site
This works perfectly except it doesn't seem to add my decimal places, only adds the whole dollar. If you have a fix for this I would be very grateful.
This comment was minimized by the moderator on the site
Hi Katie, Use the below code, as the sum shows decimal places. Function SumBold(rng As Range) Dim rCell As Range Application.Volatile SumBold = 0 For Each rCell In rng If rCell.Font.Bold Then _ SumBold = SumBold + rCell Next End Function
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations