+ Reply to Thread
Results 1 to 5 of 5

Create sequential code in range based on value in neighboring column

  1. #1
    Registered User
    Join Date
    02-09-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    92

    Create sequential code in range based on value in neighboring column

    I have a worksheet with two columns:

    Column A - Project Name
    Column B - Project Code

    I need to write a script that populates Column B with a sequential project code IF the project name in Column A contains the characters 'NDA-' at the start.

    The sequential code should be 'NDA-001', 'NDA-002', etc. For example:

    Column A Column B
    Project 1 -
    Project 2 -
    NDA-Project 3 NDA-0001
    Project 4 -
    NDA-Project 5 NDA-0002

    Any help on this would be greatly appreciated

    Thank you,
    Last edited by shaunguyver; 09-12-2017 at 06:46 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Create sequential code in range based on value in neighboring column

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-09-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    92

    Re: Create sequential code in range based on value in neighboring column

    Thank you! This works perfectly - one more question. How do I specify which tab to perform this operation in? At present it only executes it in the first tab with data.

    The target tab is called 'CIP Data'.

    Thanks

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Create sequential code in range based on value in neighboring column

    Change
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-09-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    92

    Re: Create sequential code in range based on value in neighboring column

    Amazing, thanks for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Format based upon the value of a neighboring column
    By danjab in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2017, 01:03 AM
  2. Replies: 3
    Last Post: 07-15-2016, 06:45 AM
  3. VB code to create new worksheet based on cell range
    By jacksonjasonr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2014, 05:23 PM
  4. [SOLVED] Returning value from one column based on two neighboring columns
    By Ezzard in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-26-2014, 11:50 AM
  5. Create a code for offsetting range selection by 1 column
    By amartino44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 12:56 PM
  6. Replies: 1
    Last Post: 09-18-2013, 07:11 PM
  7. [SOLVED] Create sequential numbers in a column
    By mrjinx007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 01:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1