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