+ Reply to Thread
Results 1 to 10 of 10

Reference a directory to automatically format text

Hybrid View

  1. #1
    Registered User
    Join Date
    04-29-2020
    Location
    US
    MS-Off Ver
    Not Sure
    Posts
    16

    Reference a directory to automatically format text

    I'm trying to setup a directory of formulas that i could reference automatically if possible to format my text. I've attached a couple screenshots as an example. The 2nd screenshot shows an example of a formula I use to manually correct capitalization for a 3 letter design.

    On the main sheet
    Column A is where I would paste all of the name / initial text that needs to be formatted.
    Column B & C is where the updated name / initials would appear with the correct format.
    Column D would specify what type of format the name / initials are.

    Row 2 is a "3 Letter" format where the first letter is lowercase, 2nd letter is uppercase, & 3rd letter is lowercase. This would appear in Row 2 Column B
    Row 3 is a "Name Only" format where the first letter of each name needs to be capitalized. This would appear in Row 3 Column B
    Row 4 is a "First & Last Initial" format where the first name needs to be capitalized in Row 3 Column B & the first letter of the last name needs to be capitalized in Row 3 Column C.

    The directory sheet would have 2 columns
    Column A - Shows the different type of text formats
    Column B - is the formula for that text format

    I appreciate any help.

    Screen Shot 2020-08-18 at 12.22.38 PM.png
    Screen Shot 2020-08-18 at 12.22.15 PM.png

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,008

    Re: Reference a directory to automatically format text

    You could just use nested formulas, chosen by IF:

    =IF(D2="3 Letter",LOWER(LEFT(A2,1))& UPPER(MID(A2,2,1)) & LOWER(MID(A2,3,1)),IF(D2="Name Only",PROPER(A2),IF(D2="First & Last Initial",LEFT(PROPER(A2),FIND(" ",A2)+1),"")))
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    04-29-2020
    Location
    US
    MS-Off Ver
    Not Sure
    Posts
    16

    Re: Reference a directory to automatically format text

    Quote Originally Posted by Bernie Deitrick View Post
    You could just use nested formulas, chosen by IF:

    =IF(D2="3 Letter",LOWER(LEFT(A2,1))& UPPER(MID(A2,2,1)) & LOWER(MID(A2,3,1)),IF(D2="Name Only",PROPER(A2),IF(D2="First & Last Initial",LEFT(PROPER(A2),FIND(" ",A2)+1),"")))
    Thank you this is great. I do have a question, for the "First & Last Initial" format, how do I get it to paste the last name initial in column c instead of in column b? Attached is a screenshot of how it's currently showing. Thanks again
    Attachment 691609

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,008

    Re: Reference a directory to automatically format text

    Change to this

    =IF(D2="3 Letter",LOWER(LEFT(A2,1))& UPPER(MID(A2,2,1)) & LOWER(MID(A2,3,1)),IF(D2="Name Only",PROPER(A2),IF(D2="First & Last Initial",LEFT(PROPER(A2),FIND(" ",A2)-1),"")))

    and in C use this:

    =IF(D2="First & Last Initial",MID(UPPER(A2),FIND(" ",A2)+1,1),"")

  5. #5
    Registered User
    Join Date
    04-29-2020
    Location
    US
    MS-Off Ver
    Not Sure
    Posts
    16

    Re: Reference a directory to automatically format text

    Thank you very much for your help. This will save me so much time.

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,008

    Re: Reference a directory to automatically format text

    That's great! Thanks for letting me now that you were able to solve your issues.

  7. #7
    Registered User
    Join Date
    04-29-2020
    Location
    US
    MS-Off Ver
    Not Sure
    Posts
    16

    Re: Reference a directory to automatically format text

    I have one last question. How could I expand on this formula: =IF(D2="First & Last Initial",MID(UPPER(A2),FIND(" ",A2)+1,1),"") to also include "First & Last Name" where it would copy the entire last name to column c.

+ 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. [SOLVED] How to Format the output text automatically ?
    By meetgilbert in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-02-2019, 08:17 AM
  2. [SOLVED] Code to automatically format text as PROPER case
    By dw_22801 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-11-2018, 08:59 PM
  3. [SOLVED] using reference text in to automatically insert values
    By Laehy in forum Excel General
    Replies: 4
    Last Post: 02-11-2017, 03:25 PM
  4. Putting text box content automatically in another cell as reference
    By harvindersingh11 in forum Excel General
    Replies: 7
    Last Post: 09-09-2014, 10:58 AM
  5. Using Cell Reference to Insert Text Automatically on a Chart
    By PosseJohn in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-09-2014, 02:27 AM
  6. VBA automatically change text format into general format?
    By Nicawette in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2006, 08:40 AM
  7. Automatically format numbers as text
    By Mark Jennings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-02-2005, 10:04 AM

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