+ Reply to Thread
Results 1 to 3 of 3

inserting spaces prior to characters in a cell base on the value in a different cell

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    MN
    MS-Off Ver
    Excel 2010
    Posts
    2

    inserting spaces prior to characters in a cell base on the value in a different cell

    Hi folks!

    I am working on a file and want to add various numbers of spaces in front of a number in one column based on the value in another column. For example, if A1=2 and B2=52354325432, I want to add 2 spaces in front of the number in B2. Columns A has up to 7 different numbers and Column B could have an infinite number of values.

    Thanks for any help you can offer!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: inserting spaces prior to characters in a cell base on the value in a different cell

    hi beretta24, welcome to the forum. you can't add directly in B2, but you can do this in another cell:
    =REPT(" ",A1)&B2

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    MN
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: inserting spaces prior to characters in a cell base on the value in a different cell

    That certainly gives me the formatting I desire, but I would like column B to be my "working" column. I am using this to show the indented levels on a BOM. I guess it will likley do the trick as the formating is more for others than myself. Thank you for taking the time to respond benishiryo!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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