+ Reply to Thread
Results 1 to 3 of 3

Changing text in one cell based off of text in another

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    13

    Changing text in one cell based off of text in another

    I want to change part of the text in one cell based off of part of text in another cell.

    I generate a list of data that can be from either this year or last year. This is denoted by either 20BC###### or 21BC######. We give this an additional number KC-GPGY-######. I would like to be able to in real time paste in my data (20BC or 21BC) and then be able to pull down the KC-GPGY number so that they continue on sequentially but changing the first two digits to reflect the year ie. KC-GPGY-200001 or KC-GPGY-210002.

    I have attempted to create an if statement with a substitution but I couldn't make it work.

    Any assistance or thoughts on how to make this work would be appreciated. I have included a small workbook with how I would like the data to look in the future.
    Attached Files Attached Files
    Last edited by AliGW; 03-31-2021 at 04:14 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,351

    Re: Changing text in one cell based off of text in another

    in A1

    ="KC-GPGY-" &LEFT($B1,2)&TEXT(ROWS($1:1),"0000")

  3. #3
    Registered User
    Join Date
    01-13-2016
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    13

    Re: [SOLVED] Changing text in one cell based off of text in another

    Thank you very much!

+ 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. Macro Changing Text in a Cell Based on Text in Another
    By bematthe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2019, 08:43 AM
  2. Changing Text Box background based on other cell text
    By Zonc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-15-2014, 04:45 AM
  3. Changing text based on another cell's number
    By Cori_W in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-16-2014, 11:16 AM
  4. Replies: 1
    Last Post: 02-19-2014, 10:04 PM
  5. changing text in one cell based on the value of another
    By jameseldridge in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-14-2013, 10:53 AM
  6. Changing text color based on a limit within the cell
    By jessetrunk in forum Excel General
    Replies: 1
    Last Post: 02-02-2010, 09:49 AM
  7. Replies: 2
    Last Post: 07-14-2006, 12:25 PM

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