Insert Concatenate formula in Cell

K

Karen53

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
 
G

Gary Keramidas

maybe this:

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

Karen53

Thanks for your reply. I tried it but I get a syntax error.

Gary Keramidas said:
maybe this:

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


--


Gary


Karen53 said:
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
 
K

Karen53

What do the brackets do?

Thanks

Gary Keramidas said:
maybe this:

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


--


Gary


Karen53 said:
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
 
G

Gary Keramidas

someone that uses r1c1 will have to respond, i just took a stab at it. i use a1
references.

--


Gary


Karen53 said:
Thanks for your reply. I tried it but I get a syntax error.

Gary Keramidas said:
maybe this:

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


--


Gary


Karen53 said:
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
 
K

Karen53

Gary,

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

Gary Keramidas said:
someone that uses r1c1 will have to respond, i just took a stab at it. i use a1
references.

--


Gary


Karen53 said:
Thanks for your reply. I tried it but I get a syntax error.

Gary Keramidas said:
maybe this:

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


--


Gary


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
 
T

Tim Zych

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.



Karen53 said:
Gary,

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

Gary Keramidas said:
someone that uses r1c1 will have to respond, i just took a stab at it. i
use a1
references.

--


Gary


Karen53 said:
Thanks for your reply. I tried it but I get a syntax error.

:

maybe this:

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


--


Gary


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
 
D

Doug Glancy

Karen,

I think this does it:

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

hth,

Doug
 
K

Karen53

Thank you both!

Tim Zych said:
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.



Karen53 said:
Gary,

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

Gary Keramidas said:
someone that uses r1c1 will have to respond, i just took a stab at it. i
use a1
references.

--


Gary


Thanks for your reply. I tried it but I get a syntax error.

:

maybe this:

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


--


Gary


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top