Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 2nd, 2004, 07:33 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default abt the function "concatenate"

I would like to combine two variables using the concatenate function
I've things like these:

Dim add1, add2
.
.
add1 = worksheets(sh).cells(i+1, 2)
add2 = worksheets(sh).cells(i+1, 3)
.
.
Range ("A8").select
activeCells.formulaR1C1= "=concatenate(add1, add2)"

The function does not recognize variables add1 and add2



 
Old August 16th, 2004, 03:14 AM
Authorized User
 
Join Date: Aug 2004
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you really want to show the function in the cell :-

Code:
ActiveCell.Formula = _
"=concatenate(""" & add1 & """,""" & add2 & """)"
Better is (no Select needed):-

Code:
Range("A8").Value = add1 & add2

-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.





Similar Threads
Thread Thread Starter Forum Replies Last Post
abt help kripa ostwal ASP.NET 1.0 and 1.1 Basics 0 April 6th, 2007 02:13 AM
help me abt my jsp project.. sagarr JSP Basics 0 September 23rd, 2006 01:13 AM
abt struts satish_macharla Struts 1 August 7th, 2006 11:37 PM
abt strings drachx BOOK: ASP.NET Website Programming Problem-Design-Solution 1 October 5th, 2004 06:50 AM
Want to know abt BizTalk nagendrakumar_b Biztalk 3 July 29th, 2004 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.