Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-05-2019, 12:16 AM
ArviLaanemets ArviLaanemets is offline Formula to populate column with text prefix then next number (ascending) Windows 8 Formula to populate column with text prefix then next number (ascending) Office 2016
Expert
 
Join Date: May 2017
Posts: 960
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

With this 'autonumber' calculated with formula, whenever the table is sorted, those 'autonumbers' get attached to different set of data!

I have had a couple of cases where there was need to have such unique ID column, and my approach was:
On your entry sheet, add a hidden column, where the numeric part of your autonumber is calculated, like
Code:
=IF(LEFT($A1,5) = "REQ-",1*MID($A1,5,254),"")
Define a name like
Code:
nNextNumber = "REQ-" & RIGHT("0000" & (MAX(YourDataSheet!TheColumnWithEntryNumber) +1),4)
Activate some cell on your data entry sheet (e.g. A1), and define a name
Code:
lAutoNumber=IF(YourDataSheet!$A1 <> "", YourDataSheet!$A1, IF(OR(YourDataSheet!$B1 = "", LEFT(YourDataSheet!$B1,7)="Section"),"",nNextNumber)
On your data entry sheet, for column A define data validation list with source
Code:
=lAutoNumber
When user enters anything into column B which doesn't start with "Section", and there is no autonumber in column A, then user can select new autonumber.
This set-up will work best, when you define your data entry table as a Table - then all formulas and data validation lists are applied automatically to new rows added to Table.
Reply With Quote
 

Tags
auto-numbered



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me create a button to generate an ascending sequential reference number on a worksheet Blue Owl Excel Programming 1 05-24-2018 05:01 PM
If text in column then formula in other Grubermen Excel 1 09-06-2017 06:35 AM
Find entries lacking prefix and then add prefix. gsteel Excel 2 08-28-2017 11:36 AM
Formula to populate column with text prefix then next number (ascending) Shortcut to haven ascending values in row/column of cells Straitsfan Excel 1 08-09-2016 05:28 AM
Formula to populate column with text prefix then next number (ascending) Word 2007 TOC Section Number w/Alpha Prefix? Gwen Butler Office 2 09-29-2011 06:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft