Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VBA macro to join up strings

Stuart,

You can do this with a formula rather than VBA. E.g., in cell D1,
=A1&" "&B1&" "&C1

If you do want VBA, use

Range("D1").Value = Range("A1").Value & " " & Range("B1").Value &
" " & Range("C1")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"stuart" wrote in message
...
Hi,

This is a simple example of what I need help with.

In Excel cell A1 contains the word "The", cell B1 contains the

word "Blue" and cell C1 contains the word "Ocean". I need to
write a VBA macro so that cell D1 contains "The Blue Ocean". But
I don't know the syntax for doing this.

Thanks.



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
find and replace numeric strings in larger text strings Mr Molio Excel Worksheet Functions 8 November 9th 11 05:17 PM
macro to join sheets from different workbooks arashi New Users to Excel 1 February 11th 11 10:00 AM
Join tables like inner join in Access ryanp Excel Discussion (Misc queries) 2 July 18th 08 03:35 PM
join strings in VB with Pivot methods vish Excel Programming 1 February 27th 04 03:18 PM
Excel Macro Strings Brandon[_4_] Excel Programming 13 July 14th 03 04:49 AM


All times are GMT +1. The time now is 10:47 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"