Hi,
This seems like a simple procedure but just cannot get this to work right. I would like to concatenate two fixed cells into the third cell.
For example:
Cell A1=Hello
Cell A2=World
Cell A3= Hello World
Thank you.
Hi,
This seems like a simple procedure but just cannot get this to work right. I would like to concatenate two fixed cells into the third cell.
For example:
Cell A1=Hello
Cell A2=World
Cell A3= Hello World
Thank you.
=A1 & " " & A2
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Thank you mdmackillop. But how would I do this in VBA? This would be part of a Macro.
Range("A3").Value = Range("A1").Value & Range("A2").Value
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
... and with a space between
Range("A3").Value = Range("A1").Value & " " & Range("A2").Value
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
thanks Paul. I have it in a file with multiple works sheets. These cells are located on shee1. I'm putting Sheets("Sheet1") in front of your code but cant seem to make i work. Would this be the right approach?
Expanding on Mac's ...
Without explicitly specifying a worksheet, as is it will use whatever the ActiveSheet is
This is specific to Sheet1
Worksheets("Sheet1").Range("A3").Value = Worksheets("Sheet1").Range("A1").Value & " " & Worksheets("Sheet1").Range("A2").Value
or to save a little typing
With Worksheets("Sheet1") .Range("A3").Value = .Range("A1").Value & " " & .Range("A2").Value End With
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
Thank you Paul!