concatenation w/in a macro
If you look at the code that was recorded, you'll see that it's using the
..formulaR1C1 property. That means that it's building a string that uses R1C1
reference style--not A1 reference style.
Activecell.formulaR1C1 = "=""*""&R[-1]C&""*"""
Will build a formula to concatenate an asterisk with the value of the cell above
the cell getting the formula (r[-1] is the previous row and c means the same
column.)
And I bet you changed the recorded code to something else before you posted in
the newsgroups. (You lost some double quotes.)
If this doesn't help, you'll want to post more of your code.
wilson@irco wrote:
I'm trying to perform a concatenation within a macro using the recording fn,
but the syntax written into the macro is:
+"*"&R[-1]C&"*"
and once I copy this macro into my file, the concatenation obviously doesn't
work.
The concatenation is to generate barcode fields for the data in the cell
above. so, it looks like +"*"&A2&"*" (given my source data is in cell A2).
why is the macro converting this to +"*"&R[-1]C&"*"? Thanks.
--
Dave Peterson
|