메인 컨텐츠로 가기

Excel에서 셀을 클릭하거나 선택할 때 셀 색상을 변경하는 방법은 무엇입니까?

이 기사에서는 셀을 클릭하는 동안 셀 색상을 변경하고 Excel에서 셀 범위를 선택하는 동안 강조 표시된 색상을 변경하는 방법에 대한 몇 가지 방법을 보여줍니다.

VBA 코드로 셀을 클릭하면 셀 색상 변경
VBA 코드로 셀을 선택할 때 강조 표시된 색상 변경
Excel 용 Kutools로 활성 셀의 전체 행과 열 강조 표시


VBA 코드로 셀을 클릭하면 셀 색상 변경

여기에서 셀을 두 번 클릭하거나 다음 VBA 코드로 마우스 오른쪽 버튼을 클릭하면 셀의 배경색을 변경할 수 있습니다.

1. 워크 시트에서 클릭 할 때 셀 색상을 변경하고 시트 탭을 마우스 오른쪽 단추로 클릭 한 다음 코드보기 오른쪽 클릭 메뉴에서.

2. 에서 응용 프로그램 용 Microsoft Visual Basic 창에서 아래 VBA 코드를 복사하여 붙여 넣으십시오. 암호 창.

VBA : 클릭 할 때 셀 색상 변경

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Target.Interior.Color = vbRed
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    Target.Interior.Color = vbGreen
End Sub

3. 프레스 다른 + Q 키를 동시에 닫아 응용 프로그램 용 Microsoft Visual Basic 창.

그런 다음 셀을 두 번 클릭하면 빨간색으로 표시됩니다. 셀을 마우스 오른쪽 버튼으로 클릭하면 녹색으로 표시됩니다. 스크린 샷보기 :


한 번의 클릭으로 Excel에서 선택한 셀의 행과 열을 강조 표시합니다.

Excel 용 Kutools's 레이아웃 읽기 유틸리티는 아래 데모와 같이 Excel에서 선택한 셀의 행과 열을 빠르게 강조 표시하는 데 도움이됩니다.
지금 다운로드하여 사용해 보세요! (30일 무료 트레일)


VBA 코드로 셀을 선택할 때 강조 표시된 색상 변경

기본적으로 셀 범위를 선택할 때 강조 표시된 색상은 회색입니다. 선택한 범위를 더 돋보이게하려면 강조 표시된 색상을 필요한 색상으로 변경할 수 있습니다. 다음과 같이하십시오.

1. 선택한 범위의 강조 표시된 색상을 변경하려는 시트 탭을 마우스 오른쪽 버튼으로 클릭하고 코드보기 오른쪽 클릭 메뉴에서.

2. 에서 응용 프로그램 용 Microsoft Visual Basic 창에서 아래 VBA 코드를 복사하여 붙여 넣으십시오. 암호 창.

VBA 코드 : 선택한 범위의 강조 표시된 색상 변경

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    With Target
        .Worksheet.Cells.FormatConditions.Delete
        .FormatConditions.Add xlExpression, , "TRUE"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
End Sub

3. 프레스 다른 + Q 닫는 동시에 키 응용 프로그램 용 Microsoft Visual Basic 창.

이제부터는 선택한 범위 또는 셀의 강조 표시된 색상이 노란색으로 변경됩니다. 다른 셀 또는 셀 범위를 클릭하면 셀에 자동으로 색상이 지정됩니다.


Excel 용 Kutools로 활성 셀의 전체 행과 열 강조 표시

큰 워크 시트를 처리하는 경우 더 쉽게 읽을 수 있도록 활성 셀의 전체 행과 열을 강조 표시해야합니다. 여기 레이아웃 읽기 ~의 유용성 Excel 용 Kutools 당신을 도울 수 있습니다.

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

1. 클릭 쿠툴 > 레이아웃 읽기. 스크린 샷보기 :

그런 다음 읽기 레이아웃이 활성화되면 활성 셀의 행과 열이 즉시 강조 표시되는 것을 볼 수 있습니다.

주의 사항: 아래 스크린 샷과 같이 필요에 따라 읽기 레이아웃 설정을 변경할 수 있습니다.

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


Excel 용 Kutools로 활성 셀의 전체 행과 열 강조 표시

최고의 사무 생산성 도구

🤖 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 (28)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, i built a dashboard with 37 worksheets, everyone with a table. All of them are lock panels because are to large and i need to know the number and name of the student who am i entering data for. Despite that, i have to keep my finger on the left side of the screen to identify the names and numbers to which the entered data refer.  So, i need to identify the first two cells of the row, in the columns "I" and "J".
The code that i took from the internet and couldn't change for the two cells of columns "I" and "J" was:

Dim lTarget As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Row >= 16 Then

If Not lTarget Is Nothing Then

lTarget.EntireRow.Interior.ColorIndex = 0
End If

Target.EntireRow.Interior.Color = 9359529

Set lTarget = Target
End If
End Sub

All tables begin in diferent rows. This example start in 16 row but i put the code in all the pages and adapt to the needs of the specific row number. 
I've already tried to change the code from EntireRow to Range ("I16:J43") but the cells were in the range became all painted with the code color.
Already try a diferent way through the "conditional formatting" with the formula =E($I16<>"";LIN()=CÉL("lin")) in the range $I16:$J43, and in the developer "worksheet", with "Application.Calculate" and it works. I change in the 37 worksheets but i was copying and data from the previous file to this new one and I noticed that the options to paste "values", etc, disappear from my dashboard. The code must be executing something that, like clicking on the cell, no longer lets it paste. A single option was to paste with CTRL+V.
If someone can help me with the code, i'll delete the VBA "Application.Calculate" to to get back to the available collage options.
Thak you for your help.

Luís Lopes
This comment was minimized by the moderator on the site
Hello, the code used to work for a while, but now it doesn't anymore. What can there be wrong?
This comment was minimized by the moderator on the site
Hi Rens Borburgh,There are two codes provided in the post, which one did you use? Did you get any error prompt?
This comment was minimized by the moderator on the site
I have tried them both at the same time. After copying it to a usb stick it didn't work anymore.
This comment was minimized by the moderator on the site
Hi Rens Borburgh,I don't quite understand what you mean. The codes should be used in the sheet code window and not in the Module window. Or can you provide a screenshot of your code window?
This comment was minimized by the moderator on the site
Hi, I am trying to use the double click option to change a cell to green but i also want that cell to go back to no fill or white if i double click it whilst it is green. Is this possible? 
This comment was minimized by the moderator on the site
alguien que me ayude solo quiero que al hacerle click a una celda se ponga de un color y que se mantenga ese color y si le vuelvo hacer click regrese el color original que tenia
This comment was minimized by the moderator on the site
How to highlight the cell(with data) to automatically highlight the other cells (data which is related another data in a previous cell) with click of the cell.Can i do it. Is there a way to do it.
This comment was minimized by the moderator on the site
The code works as long as I do not protect the worksheet. Once I protect the worksheet, because I have conditional formatting on locked cells, the code will not work. How can I change this so that it works on locked worksheet where the user can select unlocked cells?
This comment was minimized by the moderator on the site
Hi,
is it possible to have a code for "change cell color when clicking on it" in the way that it will not change already formated cells with another color, please?
After applying your code all my formating (colours) is away. Thank you. Veronika
This comment was minimized by the moderator on the site
Thank you. Great Job
This comment was minimized by the moderator on the site
hi
the is working grate but i want that the color should only be when the cell is selected and when i select something else, the first cell i selcted should not be colored
can you help me pls with this thanks
This comment was minimized by the moderator on the site
I had that exact same question! I hope someone will answer you! The reason I am looking for this is I have a spreadsheet I use daily and put in lots of information into single cells. It gets hard to see the values (visually, it runs into info in other cells), and would be a great feature if I could change the color of the cell being edited - only while it is being edited. The simplest solution I can think of is that the cell value would be set back to what it was prior to being clicked on - but I don't know how to do that.
This comment was minimized by the moderator on the site
Hi, I am trying to figure out how to change the color of a cell, based on a selection from a dropdown list. For example, HIGH=red, MEDIUM=yellow, LOW=green.

Any tips you can provide are greatly appreciated. Thank You
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