表格序號如何自動變化(wps表格自動更新資料)

我們用Excel製作表格中,使用序號是經常要用到的。也許你覺得序號很簡單,就是數字順序排列,但是刪除行或增加行後你的序號還順序嗎?

今天小編教大家讓序號自動更新的方法,學會了再也不用手動編號了。

情況一:刪除行後序號自動更新

象上圖中的表格,如果刪除一行後序號就不再連續,再手動輸入或者填充輸入,都相當麻煩。可以利用函式做一個智慧序號。

在B3單元格中輸入公式:=ROW()-2 ,回車確認後,再選中B3單元格雙擊填充即可,這樣刪除行後序號會自動更新,演示如下圖:

【注意】公式中"-2"是根據單元格所在第幾行,如示例中B3單元格有第3行,所以-2,如果在第4行,就是-3。

情況二:增加、刪除行後序號自動更新

上面的情況在刪除行後序號會自動更新,如果是增加行,需要再雙擊填充才可以自動更新。我們也可以利用函式讓其增加行後自動更新。

具體操作步驟:

1、新增一輔助列,示例中利用A列作為輔助列;

2、在A3單元格輸入:=1 ,在B3單元格輸入公式:=SUBTOTAL(2,A$3:A3),再選中這兩個單元格雙擊填充柄向下填充公式;

3、選中表格,按Ctrl T鍵,點選【確定】將表格轉換成超級表;

4、滑鼠右鍵單擊列標A,選擇【隱藏】。

這樣不管是增加行還是刪除行,序號都會自動更新,演示如下圖:

你學會了嗎?記得給小編轉發、點贊喲!需要什麼教程可以在評論區留言

       
專欄
WPS2019表格和文字二合一教程
作者:Excel與財務
58幣
21人已購
檢視

#pgc-card .pgc-card-href { text-decoration: none; outline: none; display: block; width: 100%; height: 100%; } #pgc-card .pgc-card-href:hover { text-decoration: none; } /*pc 樣式*/ .pgc-card { box-sizing: border-box; height: 164px; border: 1px solid #e8e8e8; position: relative; padding: 20px 94px 12px 180px; overflow: hidden; } .pgc-card::after { content: " "; display: block; border-left: 1px solid #e8e8e8; height: 120px; position: absolute; right: 76px; top: 20px; } .pgc-cover { position: absolute; width: 162px; height: 162px; top: 0; left: 0; background-size: cover; } .pgc-content { overflow: hidden; position: relative; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } .pgc-content-title { font-size: 18px; color: #222; line-height: 1; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pgc-content-desc { font-size: 14px; color: #444; overflow: hidden; text-overflow: ellipsis; padding-top: 9px; overflow: hidden; line-height: 1.2em; display: -webkit-inline-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .pgc-content-price { font-size: 22px; color: #f85959; padding-top: 18px; line-height: 1em; } .pgc-card-buy { width: 75px; position: absolute; right: 0; top: 50px; color: #406599; font-size: 14px; text-align: center; } .pgc-buy-text { padding-top: 10px; } .pgc-icon-buy { height: 23px; width: 20px; display: inline-block; background: url(https://lf3-cdn-tos.bytescm.com/obj/cdn-static-resource/pgc/v2/pgc_tpl/static/image/commodity_buy_f2b4d1a.png); }