+ Reply to Thread
Results 1 to 6 of 6

Inserting text in empty cell based on the characters of another cell

  1. #1
    Registered User
    Join Date
    06-27-2020
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    19

    Inserting text in empty cell based on the characters of another cell

    Hey there,

    I'm trying to add letters into blank cells - either "A" or "B", based on certain characters in other cells. The column has data in it with the format "STG.A39", where "STG." remains the same but the letters and numbers change in each row. I want to add an "A" in the empty column for any cells containing "STG.E" through "STG.K", and add a "B" for any cells containing "STG.A" through "STG.D". The numbers are irrelevant. I've attached a sample with Sheet 1 showing the original data and Sheet 2 showing the intended result. Thanks for the help!
    Attached Files Attached Files

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Inserting text in empty cell based on the characters of another cell

    Hi Joe,

    Try the below code ...

    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Inserting text in empty cell based on the characters of another cell

    Another to try:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    06-27-2020
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    19

    Re: Inserting text in empty cell based on the characters of another cell

    Fantastic, they both work perfectly! Thank you both!!

  5. #5
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Inserting text in empty cell based on the characters of another cell

    Glad to help & thanks for the reps

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Inserting text in empty cell based on the characters of another cell

    You're welcome and thanks for the rep!

+ 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. Inserting Formula Based On Another Cell Empty Or Not
    By StormStrikes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2015, 03:55 PM
  2. [SOLVED] Adding text to a cell based on specific text characters in another cell
    By JohnnyBoyxxx in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-29-2014, 06:03 PM
  3. Inserting text in cell based on value in another cell in the same row
    By BobBerryman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2013, 12:24 PM
  4. Replies: 2
    Last Post: 10-29-2012, 10:42 PM
  5. Inserting text based on another cell of number
    By bopsgtir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2011, 11:58 AM
  6. Inserting text in cell based on another cell text
    By MarHudd in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-05-2010, 12:43 PM
  7. Inserting same characters to text strings in several cell
    By 10036760 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 10-02-2007, 07:27 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