Excel: Inserting cell values in a string

  • Thread starter Thread starter Cats Five
  • Start date Start date
C

Cats Five

Hi, everyone, thanks for providing this resource!

I am trying to put some string values into a sentence in Excel. For
instance, cell A1 keeps changing. Sometimes it's 1000, let's say. The
sentence I want would be something like,

"If you have 'A1' apples, then 'A1*.5' will be rotten."

But it would show up as

"If you have 1000 apples, then 500 will be rotten."

And so on. Then I can copy this sentence into my email. Can anyone
tell me how to do this?

THANKS in advance!

C5
 
Hi
try
="If you have " & A1 & " apples, then " & A1*0.5 & " will be rotten."
 
="If you have " & A1 & " apples, then " & Text(A1*0.5,"0") & " will be
rotten."
 
VBA string?

sStr = "If you have " & Range("A1") & " apples, then " & Range("A1") * .5 &
" will be rotten."

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top