『壹』 Excel 如何設定選中一格後所在列和行都有顏色
Excel 如何設定選中一格後所在列和行都有顏色 第一步 按住Alt鍵不放,再按F11調出VBA
第二步 在VBA中雙擊左側的sheet1
第三步 在右邊復制以下程式碼
第四步 關閉VBA
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
.Parent.Cells.Interior.ColorIndex = xlNone
.EntireRow.Interior.ColorIndex = 6
.EntireColumn.Interior.ColorIndex = 6
End With
End Sub
程式碼中的兩個 =6 是背景顏色為黃色
=7是粉紅色 可以修改數字 改變背景顏色
如何設定選中一格後所在列和行都有顏色
通過寫VBA程式碼來解決:
按ALT+F11,在右邊寫入如下程式碼(為防止手誤,請復制我的程式碼進行貼上):
Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Target .Parent.Cells.Interior.ColorIndex = xlNone .EntireRow.Interior.Color = vbGreen .EntireColumn.Interior.Color = vbCyan .Interior.Color = vbWhite End WithEnd Sub
設定選中一格後所在列和行都有顏色
不可以,不過如果你的一個工作薄中有很多工作表,則可以讓所有工作表都實現此功能。
按ALT+F11鍵,雙擊左邊的ThisWorkbook,右邊第一格選擇WorkBook,第二格選擇SheetSelectionChange,然後把以下程式碼復制貼上進去,完成後的樣子如下:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) With Target .Parent.Cells.Interior.ColorIndex = xlNone .EntireRow.Interior.Color = vbGreen .EntireColumn.Interior.Color = vbCyan .Interior.Color = vbWhite End WithEnd Sub
完成後,這個工作薄中的每一個工作表都能實現選擇一個單元格,則高亮其行與列。
excel表格中,怎麼設定,點一個格子,它所在的行和列都有顏色?
WPS中的「檢視」中,有「閱讀」模式,選擇後,點選任一單元格,所在行或列都會變色,Excel沒有這樣的功能,除非進行VBA程式設計設定。
如何設定EXCEL表的表格有顏色?
先選中所有設定顏色的單元格
然後,再設定單元格顏色格式
android listview如何設定選中顏色
新建drawable/item_bk.xml
Xml程式碼
<selector xmlns:android=":schemas.android./apk/res/android">
<item android:state_window_focused="false"
android:drawable="@color/trans" />
<item android:state_focused="true" android:drawable="@color/trans"></item>
<item android:state_pressed="true" android:drawable="@color/trans"></item>
</selector>
然後在listview裡面加入:
Xml程式碼
android:listSelector="@drawable/item_bk"
EXCEL中如何設定單元格顏色
CTRL+A,或點選列A左邊,行1上邊的那個地方,可以全選工作表。
此時活動單元格為A1。
全選工作表設條件公式會占更多的系統資源。
請教AdvStringGrid1如何設定當前選中行某列的顏色
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, BaseGrid, AdvGrid;
type
TForm1 = class(TForm)
AdvStringGrid1: TAdvStringGrid;
procere FormShow(Sender: TObject);
procere AdvStringGrid1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procere AdvStringGrid1Click(Sender: TObject);
private
{ Private declarations }
FCol, FRow :Integer;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procere TForm1.FormShow(Sender: TObject);
var
LCol, LRow :Integer;
begin
for LCol:=0 to 4 do
AdvStringGrid1.Cells[LCol, 0] := '第' + IntToStr(LCol+1) + '列';
for LRow :=1 to 9 do
begin
AdvStringGrid1.Cells[0, LRow] := '0' + IntToStr(LRow);
AdvStringGrid1.Cells[1, LRow] := '1' + IntToStr(LRow);
AdvStringGrid1.Cells[2, LRow] := '2' + IntToStr(LRow);
AdvStringGrid1.Cells[3, LRow] := '3' + IntToStr(LRow);
AdvStringGrid1.Cells[4, LRow] := '4' + IntToStr(LRow);
end;
end;
procere TForm1.AdvStringGrid1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
AdvStringGrid1.MouseToCell(x, y, FCol, FRow);
end;
procere TForm1.AdvStringGrid1Click(Sender: TObject);
var
i :Integer;
LColor :TColor;
begin
if (FRow>0) and (FRow<=AdvStringGrid1.RowCount-1) and AdvStringGrid1.RowSelect[FRow] then
begin
AdvStringGrid1.Colors[1, FRow] := clRed;
AdvStringGrid1.Colors[4, FRow] := clRed;
AdvStringGrid1.Repaint;
end;
LColor := AdvStringGrid1.Colors[0,1];
for i:=1 to AdvStringGrid1.RowCount - 1 do
begin
if i <> FRow then
begin
AdvStringGrid1.Colors[1, i] := LColor;
AdvStringGrid1.Colors[4, i] := LColor;
end;
end;
end;
end.
如何設定所有2010excel網格線顏色
【檔案】選單-【選項】- 【高階】,中間左右有個可以選網格線顏色的地方。
我自己用的2010,即使網格線顏色選擇黑色,表格里也是偏灰的。如果還覺得深,可以調成淺灰色。
『貳』 excel表中單元格顏色怎樣設置
軟體工具:Excel2007
講解步驟:
1、打開Excel2007,選中需要改變顏色的單元格。
2、進行以下操作,右鍵—設置單元格格式
或者單擊工具欄上的「開始」選項卡里的「字體」欄里右下角的箭頭,如圖所示。
3、彈出「設置單元格格式」工具欄,並選中「填充」選項卡
4、選擇「背景色」,也可以填充效果、圖案樣式等的設置,最後單擊「確定」按鈕。
『叄』 excel 選擇一個單元格 所在行列變色 怎麼設置
1,打開Excel程序,進入Excel程序主界面。
『肆』 excel設置單元格顏色的方法
excel是現在這個時代中被廣泛運用的三大辦公軟體之一, Excel 裡面有各種各樣的功能可以幫助用戶進行數據編輯以及處理,其中設置單元格顏色功能為常用,下面是我帶來的關於excel設置單元格顏色的 方法 ,希望閱讀過後對你有所啟發!
excel設置單元格顏色的方法:
設置單元格顏色步驟1:打開表格以後,選擇表格里要添加背景色的單元格,如下圖。
設置單元格顏色步驟2:選擇好單元格後,單擊滑鼠右鍵,在彈出的命令菜單中找到“設置單元格格式”命令,點擊這個命令。
設置單元格顏色步驟3:點擊之後就會出現“設置單元格格式”對話框,在對話框中找到“圖案”按鈕。
設置單元格顏色步驟4:點擊這個按鈕,在單元格底紋中選擇自己需要添加的背景色後點擊確定。
設置單元格顏色步驟5:如下圖就可以看到所選擇的單元格已經添加上了背景色。