Copy data of two cells into one

M

maperalia

How can I copy information from two cells into another cell.
For example, I have the data "M" in cell C5 and the data "L" in the cell C6
and I want to copy the following in the cell C20: M@L a, b, c
So, "M" and "L" are always variables and the rest (@ a, b, c) are always the
same.

Thanks in advance.
Maperalia
 
M

maperalia

Gary;
I have the formula you gave me (=C5 & "@" & C6 & " a,b,c")
placed on the cell "C20". It is working perfectly, however, I need to add
the following information:
When the cell "C8" has the value 1000 I want the formula in the cell "C20"
to be =C5 & "@" & C6 & " a,b,c,d" instead.
It is possible to do this.

Thanks in advance.
Maperalia
 
M

maperalia

JE;
The previous formula (=C5 & "@" & C6 & " a,b,c") was reprensented in vba as
a the following statement: "=R5C & ""@"" & R6C & "" a, b, c""".
I wondert if you can help me to represent your formula (=C$5 & "@" & C$6 & "
a,b,c" & IF(C$8="0.0025 in/min",",d","")) in vba' statement.
The problem is that I have a macro which clean the cells to type the new
data. Since this is a formula I have you place the formula again.

Thanks in advance.
Maperalia
 
J

JE McGimpsey

One way:

"=R5C & ""@"" & R6C & ""a, b, c"" & IF(R8C=""0.0025
in/min"","",d"","""")"
 
M

maperalia

JE;
Thanks for your quick response.
I put the statament you gave me ( "=R5C & ""@"" & R6C & ""a, b, c"" &
IF(R8C=""0.0025 in/min"","",d"","""")" ) and I got the following error
message:
"Compile Error: Expected:line number or label or statement or end of
statement"
Could you please tell me how to fix it?

Thanks.
Maperalia
 
Top