跳到主要內容

如何在Excel中自動為列編號?

您是否曾經想過在Excel中為列編號? 本教程將討論一些對列進行編號的方法。

通過公式= ROW()自動編號一列

通過公式= OFFSET()自動編號一列

通過自動填充句柄自動為列編號

通過Kutools for Excel的插入序列號為列編號


通過公式= ROW()自動編號一列

如果要根據行號對列進行編號,可以鍵入此公式 = ROW() 進入細胞並按 Enter 鍵,然後將自動填充手柄拖到您需要編號的單元格上。

文檔編號列 1


通過公式= OFFSET(A2,-1,0)+1自動為一列編號

如果要不基於行號自動對列單元格進行編號,則可以鍵入以下公式 =偏移(A2,-1,0)+1 進入要從2開始數字序列的單元格A1,然後按 Enter 鍵,然後將自動填充手柄拖到所需的單元格中。

文檔編號列 2

注意:

1.使用上面的公式自動為一列編號,A2是當前單元格的地址,並且該單元格上方的單元格必須為空白或0。例如,如果要將此公式輸入到單元格K5中,則應將該公式修改為 =偏移(K5,-1,0)+1,並且單元格K4必須為空白或0。

2.如果從數字系列中刪除一個數字,則以下數字將從1開始。

文檔編號列 3


在Excel中插入序號

如果要在Excel中插入自定義的序號,例如KTE-0001-Jone,KTE-0002-Jone,KTE-0003-Jone ...,則在Excel中拖動鼠標時將不會正常填充序列字符串。 現在,隨著 插入序列號 的效用 Excel的Kutools,您可以創建任何自定義序列號并快速插入它們。  點擊下載 30 天免費試用.

文檔編號列 1

通過自動填充功能自動為列編號

在Excel中,自動填充功能還可以幫助您為列編號。

在要開始編號的單元格中鍵入1,然後將單元格右下角的自動填充手柄拖到要編號的單元格上,然後單擊填充選項以展開選項,然後檢查 填充系列,然後對單元格進行編號。 查看截圖。

文檔編號列 4

備註:如果刪除一個數字系列中的一個數字,則保留其他數字。
文檔編號列 5


通過Kutools for Excel的插入序列號插入列號

如果您想插入自定義序列號來為列編號,則可以嘗試 插入序列號 的工具 Excel的Kutools.

Excel的Kutools, 與以上 300 方便的功能,使您的工作更加輕鬆。 

免費安裝 Kutools for Excel,請執行以下操作:

1。 點擊 庫工具 > 插入 > 插入序列號.
文檔編號列 6

2。 點擊 全新 按鈕以展開對話框,然後根據需要設置自定義順序,可以指定前綴和後綴,也可以定義所需的位數。 看截圖:
文檔編號列 7 文檔編號列 8

3。 點擊 加入 要創建此序列,然後選擇要插入數字的列範圍,請單擊 填充範圍 將數字填充到單元格中。
文檔編號列 9

提示:

1。 在裡面 插入序列號 對話框,它將標記最後插入的序列號 前一頁 列表,如果您下次插入此序列號,則第一個序列號將標記在“下一個”列表中。

2。 你可以點擊 全新 按鈕可創建更多序號。

3。 你可以點擊 重設 重置序列。

4。 同 插入序列號 工具,您還可以執行以下操作:

快速在一系列單元格中創建並插入重複的序號

在合併的單元格中快速創建並插入序號


相關文章:

  • 如何從Excel中的文本字符串中刪除數字?
    例如,文本字符串中混合了許多數字,而您想從文本字符串中刪除這些數字。 如何完成? 本文將介紹一些技巧,可以輕鬆地從Excel中的文本字符串單元格中刪除數字。

  • 如何在Excel中識別丟失的數字序列?
    假設您有一長串序列號來標記項目,例如銀行對帳單中的支票號,通常我們會滾動瀏覽並手動找到丟失的序列號。 但是,這裡有一些棘手的方法來處理它。

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (21)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Drag and fill isn't doing anything. When I put in formula and hit enter, it puts a 0 there. No numbers anywhere else. It's faster to renumber it manually than trying to get this to work.
This comment was minimized by the moderator on the site
Sziasztok
Szeretném megkérdezni excellben van egy sorszámozott oszlopom, kiveszek egy nevet és a sorszámot újra kell 1 essel kezdenem
ha lehúzom a kis sarokban akkor nem számozza át újra
marad a 2 től 2 3 4 5 6 stb
tehát át kell számoznia 1 től de nem teszi meg
pl 2 osztályosok vannak 21 en, kivettem egy tanulót és a sorszámot át kellene írnia ha lehúzom a kis kockába de nem teszi meg utánuk rögtön jön a 3 osztályosok névsora 1 essel kezdődő sorszámmal
tehát nem sorszámoz ha kiveszek egy tanulót...
hogy tudom ezt megoldani mert sokszor van ilyen
köszönöm szépen
This comment was minimized by the moderator on the site
Hi, I do not understand your question. Could you upload a file or a picture to describe your question in details?
This comment was minimized by the moderator on the site
Надеюсь, это поможет, по крайней мере в умных таблицах работает отлично.
Требуется: начать нумерацию с A2. Тогда в этой ячейке следует ввести:
=СТРОКА()-СТРОКА($A$1)
Если нужно начать с Q26: =СТРОКА()-СТРОКА($Q$25) [Главное, чтобы ссылка на строку была зафиксированной, фиксация столбца не обязательна.]
Если нужен формат 01, 02 ... 10, 11 (две цифры до 10), тогда формула примет следующий вид:
=ТЕКСТ(СТРОКА()-СТРОКА($A$1);"00")
Нужно больше нулей - меняем в формуле "00" на столько, сколько душе угодно.
This comment was minimized by the moderator on the site
Ещё вариант, чтобы не быть зависимым от верхней ячейки. Требуется то же самое, начать нумерацию с A2.
=СТРОКА()-СТРОКА(СМЕЩ($A$2;-1;0))
Отличие от предыдущей формулы состоит в одном - разное поведение в случае, если необходимо вставить новую строку над первой пронумерованной строкой.
This comment was minimized by the moderator on the site
hoe kan ik als ik bv bij a1 50 invul die 50 ergens bij op laten tellen en a1 dan weer naar 0 laten gaan?
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hi, please how to number rows with a letter prefix, without dragging and how to do it so that the numbers remain the same even after moving to another row? To make them static values. Example:

AHJS1000

AHJS1001

AHJS1002
...

thanks
This comment was minimized by the moderator on the site
I'm confused regarding offset.

I am trying to autofill from Cell A3 however, there is a title in Cell A2 describing what the numbers below represent.

How do I use the autofill Offset formula, if the above Cell is not blank? Thanks
This comment was minimized by the moderator on the site
Hi, if the above cell is not blank, you can type the start number in the cell, suppoing, you want to fill numbers in D2:D8, and D1 contains header, you can type 1 into D2 firstly, then type formula =OFFSET(D3,-1,0)+1 into D3, and drag fill handle down to D8. See screenshot:
This comment was minimized by the moderator on the site
Is it possible to only auto fill to a certain number, without dragging to that number? Basically the total number is a variant,defined by a count function.
This comment was minimized by the moderator on the site
Hi, zoe, you want to auto fill numbers without dragging, right? If so, this tutorial will help you https://www.extendoffice.com/documents/excel/4448-fill-to-specific-row-without-dragging.html
This comment was minimized by the moderator on the site
I've deleted some rows in excel now my far left column numbering is eg 1,2,3,45,46,47 how do I get back to sequential numbering?
This comment was minimized by the moderator on the site
If you have deleted rows, then you just need to renumber the sequential numbering, you can type the begining number 1 in first cell, then drag fill handle down to fill seriers.
This comment was minimized by the moderator on the site
When I insert a row, the first column should have the sl.no above+1 and the rows below should be automatically numbered. This should happen without I needing to drag the formula
What is the solution for such case?
This comment was minimized by the moderator on the site
TRY THIS...


I AM GIVING FORMULA STARTING FROM A2 AS I CONSIDER THAT A1 CONTAINS THE TITLE "S.NO."


IN A2....... =IF(B2>0,1,"")

IN A3........=IF(B3>0,MAX($A$2:A2)+1,"")


THAN DRAG THE FORMULA FROM A3 TO DOWNSIDE. NOW THIS FORMULA WILL WORK WHEN YOU ENTER SOME TEXT IN B2,B3,.........,IT WILL ENTER SERIAL NO. AUTOMATICALLY.
This comment was minimized by the moderator on the site
improving the formula from the comment above (from Pkm)

try entry the formula below in A2 and then drag from A2 to downside and it will enter serial number automatically when you enter text in any cell in B column.
=IFERROR(IF(AND($A1="";$B2<>"");MAX(A1:$A$2)+1;IFS(AND($B2<>"";ISNUMBER($A1));MAX($A1:$A$2)+1;AND($B2<>"";ISTEXT($A1));1));"")

This comment was minimized by the moderator on the site
Sorry my hands are tied.
This comment was minimized by the moderator on the site
I want an auto-numbering that even if I delete a row in the middle, the numbers below will automatically adjust
This comment was minimized by the moderator on the site
=row() can work.
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