excel如何做到滑鼠點選某單元格,另一單元格就自動顯示滑鼠單元格的內容

2022-05-18 05:08:28 字數 1812 閱讀 5411

1樓:魚木混豬喲

用vba寫**即可實現。

詳細步驟如下:

1.alt+f11,開啟vba編輯介面,雙擊左側microsoft excel物件下的「sheet1」,確保程式是在sheet1中執行

2.點選下圖「通用」右側的下拉箭頭,選擇worksheet4.補充寫上一句**「range("h1")=target.text"

5.關閉vba介面,返回sheet1,點選任意單元格,就看到h1的值就等於點選單元格的值

2樓:匿名使用者

將下列**貼上到巨集**區中。

private sub worksheet_selectionchange(byval target as range)

if target.row = 5 and target.column = 7 then exit sub

if target.row >= 7 and target.row <= 10 and target.

column >= 2 and target.column <= 7 then

range("g5") = target.valueend if

end sub

3樓:匿名使用者

可以 用 vba  selecte change 事件

4樓:平陽虎

一段簡單的vba**就行了。

公式是做不到的。

5樓:快樂世紀冰河

private sub worksheet_selectionchange(byval target as range)

if target.row >= 2 and target.column <= 5 then

r = range("g" & rows.count).end(xlup).row

if r = 1 then exit sub

if target.column = 1 then cells(r, "h") = target.value

if target.column = 2 then cells(r, "h") = target.value

if target.column = 3 then cells(r, "i") = target.value

if target.column = 4 then cells(r, "j") = target.value

if target.column = 5 then cells(r, "k") = target.value

end if

end sub

如何讓滑鼠點選到的excel 單元格變色?

6樓:范特西丶

如果你要只是變色的話,點選「檢視」,再點閱讀模式就可以了。

請教各位大俠: excel中如何實現在一個特定單元格中顯示任一個滑鼠選中單元格的內容?

7樓:匿名使用者

這個只能用vba實現

alt+f11,開啟vbe

左邊點你要實現這個功能的頁面,然後在右側的**區黏貼private sub worksheet_selectionchange(byval target as range)

if target.count > 1 then exit subif target.address = "$h$1" then exit sub

cells(1, "h") = target.valueend sub

就可以實現了(ps:貼過去可能變一行了,弄成這裡顯示的樣子就行了。

excel如何做到滑鼠點選某單元格,另一單元格就自動顯示滑鼠單元格的內容

private sub worksheet selectionchange byval target as range if targetrow 21 and target.column 8 then range h1 cells target.row,target.column end if en...

EXCEL如何某單元格資料自動讀取輸入單元格的資料

1 電腦開啟excel 2 再a1單元格中輸入任意數字,然後再另一個單元格輸入公式 if a1 a1,3 另一個單元格輸入公式 if a1 a1,後,按回車就可以了,不管a1輸入什麼東西,這個輸入公式的這個單元格都會自動生成a1的內容。4 還有一種比較簡單的方法,在另一個單元格中輸入 a1也可以得到...

excel中某一單元格如何自動填充對應相同屬性的值

兩個表如下圖。b表中有編號,有 另一個a表中只有編號。我們就需要從b表中查詢 現在在a表的黃色列寫上我拉公式。可以直接看到出來我們的的結果了,下拉,下邊的都是正確的。接下我們驗證這個規則是怎麼樣的。vlookup a2,b表 a b,2,0 a2 當前表中的取值格,b表 另一個表的名字,a 在另一表...