Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Insert Concatenate formula in Cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen53 - 18 Sep 2007 04:40 GMT
Hi,

I am having trouble inserting a formula to concatenate two cells into
another cell with a comma separating them.  

Here is one of my attempts:

MainPage.Select

With MainPage
Range("BA").Select
ActiveCell.formulaR1C1 = "= R" & NextRow & "C3" & "&" &  ","  _
   & "&" & "R" & NextRow & "C4"
End with

What am I missing?

Thanks
Gary Keramidas - 18 Sep 2007 04:51 GMT
maybe this:

ActiveCell.FormulaR1C1 = "=R[" & nextrow & "]C3 &" & """,""" & "& R[" & nextrow
& "]C4"

Signature

Gary

> Hi,
>
[quoted text clipped - 14 lines]
>
> Thanks
Karen53 - 18 Sep 2007 05:06 GMT
Thanks for your reply.  I tried it but I get a syntax error.

> maybe this:
>
[quoted text clipped - 19 lines]
> >
> > Thanks
Gary Keramidas - 18 Sep 2007 05:36 GMT
someone that uses r1c1 will have to respond, i just took a stab at it. i use a1
references.

Signature

Gary

> Thanks for your reply.  I tried it but I get a syntax error.
>
[quoted text clipped - 22 lines]
>> >
>> > Thanks
Karen53 - 18 Sep 2007 05:44 GMT
Gary,

Thanks for making a stab at it.  It was worth a shot.

> someone that uses r1c1 will have to respond, i just took a stab at it. i use a1
> references.
[quoted text clipped - 25 lines]
> >> >
> >> > Thanks
Tim Zych - 18 Sep 2007 06:06 GMT
ActiveCell.FormulaR1C1 = "=R" & nextrow & "C3&"",""&R" & nextrow & "C4"

Brackets make the Row/Column relative to the formula (not used in the above
example).

=R1C1 will always refer to A1
=R[5]C[2] , if A1 is going to contain the formula, refers to C6.

> Gary,
>
[quoted text clipped - 32 lines]
>> >> >
>> >> > Thanks
Karen53 - 18 Sep 2007 13:28 GMT
Thank you both!

> ActiveCell.FormulaR1C1 = "=R" & nextrow & "C3&"",""&R" & nextrow & "C4"
>
[quoted text clipped - 40 lines]
> >> >> >
> >> >> > Thanks
Karen53 - 18 Sep 2007 05:16 GMT
What do the brackets do?

Thanks

> maybe this:
>
[quoted text clipped - 19 lines]
> >
> > Thanks
Doug Glancy - 18 Sep 2007 06:15 GMT
Karen,

I think this does it:

ActiveCell.FormulaR1C1 = "=R" & NextRow & "C3&"",""&R" & NextRow & "C4"

hth,

Doug

> Hi,
>
[quoted text clipped - 14 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.