Bill Golden
asked on
Putting the value of another cell in an Excel text cell.
Ok, I have totally lost it.
Simple example of what I need.
In A1 I have a color, say blue
In A2 I want to end up with the following text: The blue cow jumped over the fence.
A2 looks like this...
="The "&A1" "cow jumped over the moon."
I am getting an error. Why?
Simple example of what I need.
In A1 I have a color, say blue
In A2 I want to end up with the following text: The blue cow jumped over the fence.
A2 looks like this...
="The "&A1" "cow jumped over the moon."
I am getting an error. Why?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Last part, I promise...
Simple example of what I need.
In A1 I have a name, say Bill
In A2 I want to end up with the following text: It was Bill's cow who jumped over the "blue" moon.
A2 looks like this...
="It was "&A1&"'s cow that jumped over the "blue" moon."
I realize I need to do something to use something around the quotes that surround the word blue, but what?
Simple example of what I need.
In A1 I have a name, say Bill
In A2 I want to end up with the following text: It was Bill's cow who jumped over the "blue" moon.
A2 looks like this...
="It was "&A1&"'s cow that jumped over the "blue" moon."
I realize I need to do something to use something around the quotes that surround the word blue, but what?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it. I was obviously born missing a syntax gene, but learning. Thanks everyone.
Try using SUBSTITUTE:
In A1: Bill
In B1: It was [name]'s cow that jumped over the "blue" moon.
In C1: =SUBSTITUTE(B1,"[name]",A1 )
This will replace [name] in the sentence of B1 with the contents of A1.
In A1: Bill
In B1: It was [name]'s cow that jumped over the "blue" moon.
In C1: =SUBSTITUTE(B1,"[name]",A1
This will replace [name] in the sentence of B1 with the contents of A1.
All you need is an &TRIM(A?)&
" your info " &TRIM(A?)& " your info" & TRIM(A?)& "your info"
replace ? with the cell number
So for eg if you have Blue in cell A1 and Bill in cell A3 then in A2
="It was" &TRIM(A3)& "cow who jumped over the " &TRIM(A1)&" moon."
" your info " &TRIM(A?)& " your info" & TRIM(A?)& "your info"
replace ? with the cell number
So for eg if you have Blue in cell A1 and Bill in cell A3 then in A2
="It was" &TRIM(A3)& "cow who jumped over the " &TRIM(A1)&" moon."
ASKER
I have been "hoisted by my own pitard" since this is part of a paragraph and that makes it too long. Starting a new question.
"petard" actually. :)
ASKER
Your right of course. Not only is my sense of syntax bad, my spelling seems to be adrift!
ASKER
Simple example of what I need.
In A1 I have a name, say Bill
In A2 I want to end up with the following text: It was Bill's cow who jumped over the moon.
A2 looks like this...
="It was "&A1&""'s cow that jumped over the moon."
I am getting an error. Why?