跳到主要內容

如何在Excel中自動生成發票編號?

眾所周知,發票號是連續的。 如果我們手動輸入發票編號,我們可能會忘記上次使用的發票編號,而在Excel中會得到新發票的重疊編號。 在本文中,我將介紹兩種在Excel中輕鬆自動生成發票編號的方法。


在Excel中添加自動發票編號生成器

1。 創建一個新的工作簿,或打開工作簿,您將自動添加發票編號。

2。 查找一個空白單元格,然後輸入發票編號的起始編號。 在我們的例子中,在單元格D10000中輸入2。

3。 通過按打開“ Microsoft Visual Basic for Applications”對話框。 其他 + F11 同時鍵,然後展開 VBAProject(當前工作簿),然後雙擊 的ThisWorkbook。 見左截圖:
注意: 在我們的例子中,我們雙擊 的ThisWorkbookVBAProject(書1).

4。 將以下代碼粘貼到打開的窗口中。

VBA:語音號碼生成器

Private Sub Workbook_Open()
Range("D2").Value = Range("D2").Value + 1
End Sub

注意: 更改 D2 到您在其中輸入發票編號的起始編號的指定單元格中 步驟 2.

5。 除了將整數作為發票編號之外,我們還可以使用以下公式來驗證我們的發票編號:

否。 公式 發票編號
1 =“ CompanyName”&TEXT(TODAY(),“ yymmdd”)&D2 公司名稱141209100000
2 =“ CompanyName”&TEXT(TODAY(),“ 0”)&D2 公司名稱41982100000
3 =“ CompanyName”&TEXT(NOW(),“ MMDDHHMMSS”)&D2 公司名稱1209095819100000
4 =“ CompanyName”&TEXT(NOW(),“ 0”)&D2 公司名稱41982100000
5 =“ CompanyName”&RANDBETWEEN(100000,999999)&D2 公司名稱448685100000
注意絲帶 公式太難記了嗎? 將公式另存為“自動文本”條目,以供日後再次使用!
閱讀全文...     免費試用

筆記:
(1)更改 D2 到您在上述公式中輸入發票起始編號的單元格,然後更改 公司名 要顯示在發票編號中的文本。
(2)在單元格中輸入上述公式之一,您將自動獲得發票編號,然後按 Enter 鍵。

6。 保存當前工作簿:
在Excel 2013中,單擊 文件 > 節省 另存為)> 電腦 > 瀏覽;
B.在Excel 2007和2010中,單擊 文件 / 辦公按鈕 > 節省 另存為).

7。 在即將出現的“另存為”對話框中,請執行以下操作:

(1)在此工作簿中輸入一個名稱 文件名 框;
(2)點擊 保存類型 框並指定 Excel啟用宏的工作簿(* .xlsm) 從下拉列表中;
(3)單擊打開一個文件夾,您將在其中保存此工作簿;
(4)點擊 節省 按鈕。

 

從現在開始,每次打開“發票號生成器”工作簿時,發票號比上次打開工作簿時大1。 請注意,您必須在每次關閉之前保存工作簿。


使用KTE的插入序列號功能添加發票號

您可能會注意到,第一種方法要求您僅在指定的工作簿中獲取發票編號。 更糟糕的是,一旦您忘記在關閉前保存指定的工作簿,發票號就會重疊。 但是隨著 Excel的Kutools插入序列號 功能,無論您使用哪個工作簿,都可以插入唯一且連續的發票編號。

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

1。 選擇您將獲得發票編號的單元格,然後單擊 庫工具 > 插入 > 插入序列號.

2。 在“插入序列號”對話框中,單擊 全新 按鈕,然後在展開的序列號編輯區域中執行以下操作(請參見上面的屏幕截圖):
(1)在 序列名稱 框中輸入新序列名稱的名稱,例如 發票號碼.
(2)在 增量 框中輸入 1;
(3)在 前綴(可選) 在方框中,輸入您的公司名稱或其他要求發票編號的文字;
(4)在 起始號碼 框輸入發票編號的起始編號,例如 10000 or 1;
(5)在 位數 框中,指定數字,例如 6;
(6)點擊 加入 按鈕。

3。 保持選擇新創建的序列,然後單擊 填充範圍 按鈕,然後單擊 關閉 按鈕。

無論您在哪個工作簿中應用此內容 插入序列號 功能,它將生成比上次應用此功能大1的發票編號。 單擊以了解更多有關此的信息 Kutools for Excel的插入序列號功能

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!


演示:使用KTE的插入序列號功能添加發票號


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

在多個工作簿中插入唯一且連續的發票編號

大多數時候,我們只能通過公式或其他方法在一張紙或一張工作簿中插入連續的發票編號。 但是,隨著強大 插入序列號 Kutools for Excel的功能,您可以輕鬆地在多個工作簿中插入唯一且連續的發票編號。


廣告插入序列發票編號

在Excel的列表中輕鬆查找並插入所有缺少的序列號(發票編號)

眾所周知,發票號通常是連續的。 但是有時某些發票號可能會因錯誤而丟失。 Kutools for Excel的 查找丟失的序列號 實用程序可以幫助您查找並插入所有缺失的發票編號,並在遇到缺失的發票編號時突出顯示行或插入空白行。


廣告發現缺少序列號2

最佳辦公生產力工具

🤖 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 (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am a cleark in a school. In excel sheet student list is their. I cut the bill student wise via mail merge and give bill no manually so sometimes some bill no skipped. so I want a rule, when I skipped no give some instruction and stop. we use data validation, but its work only unique no or duplicate no. so please help us, Student name Bill no. Rahul 1 shyam 4 Atal Shivani 2 Ram Pratima 3 thank you.
This comment was minimized by the moderator on the site
How do I use this insert to auto generate the number without having to run it every time....Say, every time I open the Quote template it auto fills the cell that I inserted this number generator in?
This comment was minimized by the moderator on the site
Very helpful the automatic numbering of invoices. But how do i keep record of these invoices separately form my template ? I would appreciate your help. thanks L
This comment was minimized by the moderator on the site
jgljkasdf asjkfg asd asdf agh fajlsd fads ga df f fdadf afd adf
This comment was minimized by the moderator on the site
this is also useful for me, but i need some modification in that xxx/yy-yy/LAA XXX = number yy-yy = financial year LAA = Text Here Financial year from May-13 to April-14 So need as per Example: For Financial Year 2013-2014 001/13-14/LAA 002/13-14/LAA 003/13-14/LAA 004/13-14/LAA And for next Financial Year 2014-2015 001/14-15/LAA 002/14-15/LAA 003/14-15/LAA 004/14-15/LAA Thanks a lot. hadoop training in chennai | informatica training in chennai
This comment was minimized by the moderator on the site
The First formula uses the =IF(ISERROR( functions This has been available in all Excel versions. The Second formula uses the =IFERROR( Function Iferror was only introduced in Excel 2007 and hence cannot be used in older versions of Excel. Both formulas return the same result except that the second formula is more efficient. But unless you have many thousands of these cells with similar formulas you will not notice a speed difference. [url]VMware Training in Chennai[/url] | [url]Pega Training in Chennai[/url]
This comment was minimized by the moderator on the site
I need your help. I tried data validation for description column. But the values are wrong. If I click on the coats category, description should display all the items under the coats category but its displaying the other categories description too. Kindly help me in the formula to display the respective descriptions for the category chosen. How to activate the other buttons like filter, create invoice, clear data etc? There is no video for that. Kindly help me. I am trying this program since I wanna create a program using all these options. http://www.traininginsholinganallur.in/dot-net-training-in-chennai.html
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations