+ Reply to Thread
Results 1 to 5 of 5

Inserting values/word into a paragraph of text

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    27

    Inserting values/word into a paragraph of text

    Hi

    I'm trying to create a paragraph of text where at certain points a number or word is inserted depending on the value of a different cell. So for example, I'd want it to look like this:

    "I want to have a string of text but part way through *A1* would be inserted which could either be a number or a word"

    At the moment I'm using the concatenate function =concatenate(A2,A1,A3) with the following cells:

    A1 - The value/word I want inserting
    A2 - "I want to have a string of text put part way through "
    A3 - " would be inserted which could either be a number or a word"

    That works perfectly fine. However, the paragraph (eventually it will be a number of paragraphs) is quite long and has 10/15 different inputs so I'm concatenating a large number of cells. The user has to have the ability to edit the paragraph which is pretty difficult when its spread across a number of cells and makes no sense because there are random words/numbers missing.

    I thought about having the text all in one cell with example entries such as:

    A1 - The value/word I want inserting
    A2 - "I want to have a string of text but part way through [value] would be inserted which could either be a number of a word"

    I'd then use the concatenate function in conjunction with the LEFT and RIGHT functions so I could split it out before concatenating it again. The trouble with that is if they edit the text by adding/removing characters then it would split it up in the incorrect places.

    I wondered if there was a way of splitting up the text based on where a certain identifier is. So you would take the string of characters up to [value] and then the string of characters after [value]? So decomposing it based on where [value] is and then putting it back together with concatenate.

    Either that or some other method that I'm not aware of? The idea is for it to be as user friendly as possible.

    Thanks!

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Inserting values/word into a paragraph of text

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Inserting values/word into a paragraph of text

    Thanks for the suggestion. I've attached an example workbook.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-07-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Inserting values/word into a paragraph of text

    After doing a bit more research, I guess I could use the FIND function to find the position to split it up, before then concatenating it again.

    The use of all these functions is getting incredibly messy, particularly as I want to use this method for several long paragraphs.

    I don't suppose there is a more elegant way of just replacing the [x] (or [value] if you haven't looked at my example workbook) with the value of a different cell?

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Inserting values/word into a paragraph of text

    Here is an idea that you might want to consider. I set apart an area for the sentence to be constructed in parts with choices to be made for each part. In the end all of the parts are assembled. A posted formula won't make sense without looking at the workbook.
    Attached Files Attached Files

+ 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 a Formula in between Paragraph in Merged Cells
    By tocoolbuddy in forum Excel General
    Replies: 3
    Last Post: 07-05-2014, 07:56 AM
  2. Replies: 6
    Last Post: 11-14-2013, 03:24 PM
  3. Inserting Text Box in Word Doc from excel
    By donpre in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2012, 02:23 AM
  4. Inserting Formula Results into a Paragraph?
    By Rob.McCarthy in forum Excel General
    Replies: 4
    Last Post: 02-14-2012, 08:34 PM
  5. Replies: 0
    Last Post: 07-27-2011, 03:37 PM
  6. Bold first word in paragraph
    By yjbrody in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 06-17-2009, 09:21 PM
  7. [SOLVED] Pasted text from Excel to Word replaces previous paragraph
    By TT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2005, 03:06 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