Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2019, 02:35 PM
NBVC's Avatar
NBVC NBVC is offline Formula to populate column with text prefix then next number (ascending) Windows 10 Formula to populate column with text prefix then next number (ascending) Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

If you can insert a blank row above (and hide it, if desired), then you can add formula in C2, copied down:


=IF(B2="","",IF(LEFT(B2,7)="Section",TRIM(LEFT(B2, FIND("-",B2)-1)),"REQ-"&--SUBSTITUTE(LOOKUP(2,1/(LEFT(C$1:C1,7)="Section"),C$1:C1),"Section","")& TEXT(IF(LEFT(C1,7)="Section",1,RIGHT(LOOKUP(2,1/(C$1:C1<>""),C$1:C1),3)+1),"000")))
Reply With Quote
  #2  
Old 02-04-2019, 03:56 PM
SerenityNetworks SerenityNetworks is offline Formula to populate column with text prefix then next number (ascending) Windows 10 Formula to populate column with text prefix then next number (ascending) Office 2016
Advanced Beginner
Formula to populate column with text prefix then next number (ascending)
 
Join Date: May 2005
Location: Allen, Texas, USA
Posts: 37
SerenityNetworks
Thumbs up Thank you!

Thank you! That is exactly what I needed. From here I can tweak it for other exceptions I'll run across.

I'd experimented with the LOOKUP function and even went so far as to think that I might use it with SUBSTITUTE to get where I needed. But I could never get there. Not even close. I was making it too complicated trying to parse out just the section number instead of just using the LEFT(7) of the cell and going from there. I follow the strategy you've used, but I'm going to need to study the solution a little more to gain a full understanding of exactly how it is working.

I was able to modify your formula (using INDIRECT) to get it to work on Row 1, but it calculates slow as molasses. And not populating B1 with a section number isn't an issue anyway, so I'll use your solution as presented.

Thank you again. I don't believe I would have gotten this on my own.

Andrew
Reply With Quote
Reply

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 05:26 PM.


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