ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Best way to insert value in a setenecne (https://www.excelbanter.com/excel-discussion-misc-queries/148443-best-way-insert-value-setenecne.html)

dj479794

Best way to insert value in a setenecne
 
Excel 2003.

If in one cell I have the following statement: "Last week I ate [ x ]
apples"

And I wanted to insert a number from another cell into [ x ]. How would I
do that?

I tried have the first part of the setence one one cell. The " [ x ] " in
the second cell and the rest of the sentence in the third. But because of
other things going on in the sheet I cannot get it to line up correctly. What
are my options?

bj

Best way to insert value in a setenecne
 
try
="Last Week I ate "&A!&" apples."
if the number is in Cell A1

"dj479794" wrote:

Excel 2003.

If in one cell I have the following statement: "Last week I ate [ x ]
apples"

And I wanted to insert a number from another cell into [ x ]. How would I
do that?

I tried have the first part of the setence one one cell. The " [ x ] " in
the second cell and the rest of the sentence in the third. But because of
other things going on in the sheet I cannot get it to line up correctly. What
are my options?


Mike H

Best way to insert value in a setenecne
 
Try

="last week I ate " & A1 & " apples"

Put howe many apples you ate in A1

Mike

"dj479794" wrote:

Excel 2003.

If in one cell I have the following statement: "Last week I ate [ x ]
apples"

And I wanted to insert a number from another cell into [ x ]. How would I
do that?

I tried have the first part of the setence one one cell. The " [ x ] " in
the second cell and the rest of the sentence in the third. But because of
other things going on in the sheet I cannot get it to line up correctly. What
are my options?


Dave Peterson

Best way to insert value in a setenecne
 
="Last week I ate " & a1 & " apples."

or if you need formatting:

="Last week I ate " & TEXT(A1,"#,##0") & " apples." & CHAR(10) &
"I paid " & TEXT(B1,"$#,##0.00") & " for them on " &
TEXT(C1,"mm/dd/yyyy") & "."

char(10) wraps the text
But you'll have to use format|Cells|alignment tab|Check wrap text

dj479794 wrote:

Excel 2003.

If in one cell I have the following statement: "Last week I ate [ x ]
apples"

And I wanted to insert a number from another cell into [ x ]. How would I
do that?

I tried have the first part of the setence one one cell. The " [ x ] " in
the second cell and the rest of the sentence in the third. But because of
other things going on in the sheet I cannot get it to line up correctly. What
are my options?


--

Dave Peterson

CLR

Best way to insert value in a setenecne
 
Another way that doesn't require a helper cell, is to just format the cell as
Custom,
"Last week I ate "#" apples" and just type the number in the same
cell...........

Vaya con Dios,
Chuck, CABGx3


"dj479794" wrote:

Excel 2003.

If in one cell I have the following statement: "Last week I ate [ x ]
apples"

And I wanted to insert a number from another cell into [ x ]. How would I
do that?

I tried have the first part of the setence one one cell. The " [ x ] " in
the second cell and the rest of the sentence in the third. But because of
other things going on in the sheet I cannot get it to line up correctly. What
are my options?


Rick Rothstein \(MVP - VB\)

Best way to insert value in a setenecne
 
Excel 2003.

If in one cell I have the following statement: "Last week I ate [ x ]
apples"

And I wanted to insert a number from another cell into [ x ]. How would I
do that?

I tried have the first part of the setence one one cell. The " [ x ] " in
the second cell and the rest of the sentence in the third. But because of
other things going on in the sheet I cannot get it to line up correctly.
What
are my options?


Assuming the "apple" sentence was illustrative and that you wanted a
generalize solution, try this...

=SUBSTITUTE(A1,"[ x ]",A2)

where your sentence containing "[ x ]" is located in A1 and the other cell
containing your number is assumed to be A2.

Rick



All times are GMT +1. The time now is 03:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com