Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Populating a cell with concatenated text...

I want to enter a combination text/cell value in a cell, but vba won't let
me. It expects the end of the statement. Example: Range("A5").Formula = _
"=Summary of "&Q1&" manual comparison."

.... where Range("Q1") could be "Current" or "MTD".

Any help would be appreciated.

Sam
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Populating a cell with concatenated text...

Sam:

Try:

You need to put the text in quotes:

Range("A5").Formula = _
"=""Summary of "" & Q1 & "" manual comparison."""

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Sam" wrote:

I want to enter a combination text/cell value in a cell, but vba won't let
me. It expects the end of the statement. Example: Range("A5").Formula = _
"=Summary of "&Q1&" manual comparison."

... where Range("Q1") could be "Current" or "MTD".

Any help would be appreciated.

Sam

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Populating a cell with concatenated text...

Sam

Need a few more double quotes.

Range("A5").Formula = "=""Summary of "" & B1 & "" manual comparison."""


Gord Dibben MS Excel MVP


On Fri, 23 Feb 2007 16:35:00 -0800, Sam wrote:

I want to enter a combination text/cell value in a cell, but vba won't let
me. It expects the end of the statement. Example: Range("A5").Formula = _
"=Summary of "&Q1&" manual comparison."

... where Range("Q1") could be "Current" or "MTD".

Any help would be appreciated.

Sam


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel:Get concatenated text to be recognised as formula not text? yvette Excel Discussion (Misc queries) 5 January 15th 07 07:32 PM
How do I convert a text array to a concatenated text cell? Excel. Vargasjc Excel Worksheet Functions 5 December 20th 06 06:35 PM
Use concatenated text as name in formulas Apollo63 Excel Worksheet Functions 2 June 16th 06 04:05 PM
Populating a combobox within a form with concatenated data [email protected] Excel Programming 2 February 8th 06 03:07 AM
populating a cell with text w/ line breaks Nick Hodge Excel Programming 2 July 9th 04 12:19 AM


All times are GMT +1. The time now is 04:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"