• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Reference to an external cell from within the text in a text cell

I have a text box in one worksheet of a workbook which contains the following
"For the year ending 31 March 2014 , the company was entitled to exemption ..... etc etc"

I already have a cell in the worksheet which contains the phrase "year ending 31 March 2014".

Is it possible to insert in the appropriate place in the text box , an expression that will reference the required "year ending 31 March 2014" ?

What would the expression be if it were to reference the contents of a cell in another worksheet ?
 
Hi,

At textbox can have only values, and no formulaes.

Again, if you want the textbox to display statement/text with combination of values from different sources, then Yes, it is possible with VBA.

Regards,
Prasad DN
 
Hi ,

As Prasad has already mentioned , a textbox can only reference a cell ; what you can do is use the formula to get what ever text you wish in any unused cell in your worksheet , and then use this cell reference in your textbox.

Narayan
 
Hi ,

As Prasad has already mentioned , a textbox can only reference a cell ; what you can do is use the formula to get what ever text you wish in any unused cell in your worksheet , and then use this cell reference in your textbox.

Narayan
Narayan
Thanks for that but I do not understand how to do it ! Can you give me an example of how you think it would work ?
Is it clear from my question exactly what I am trying to do ?

Thanks in anticipation
Terry
 
Hi Terry ,

If you can upload your workbook with just the concerned textbox and the relevant cells with their data , it will be easier to demonstrate how it can be done.

Narayan
 
Hi Narayan

I have resolved the problem to my satisfaction after a lot of thought and trial and error !

I inserted a text box in the worksheet then inserted the cursor within the text box. Then clicked on the formula bar , typed in = , moved to the cell that contained the text , date , value that I wanted to retrieve (same worksheet or another one in the same workbook) and hit return.
I then split the sentence which was originally in 1 text box into two parts , each in its own text box. The first text box contained the variable part obtained using the expression(technique) explained above and the second text box contained the standard text. So , in the example above , I had "For the year ending 31 March 2015" in the first text box with the second text box aligned alongside it containing the standard text " , the company was entitled to exemption ..... etc etc".

The only thing I cannot do is to insert a variable piece of information in the middle of a sentence all within ONE text box. Any ideas !!

regards

Terry
 
Hi ,

If you can upload your workbook , it saves me the trouble of creating a workbook with the textbox , the text , the formula ... ; it will take less than 10 minutes to re-upload the workbook with the appropriate references in place if you upload your workbook.

Narayan
 
Istyak

Aaahh ! That's the way to do it !! Easy when you know how , eh ? Many thanks !
Just a question of how to adapt your technique into my spreadsheet.

But many thanks to those who also contributed.

Regards

Terry D.
 
Back
Top