Use one the series of concatenate functions that SAS has.
1569 data _null_;
1570 do _n_=1 to 3 ;
1571 length formula $ 50;
1572 formula = cats('=CONCATENATE($B',_N_,',$G',_N_,')');
1573 put _n_= formula = :$quote.;
1574 end;
1575 run;
_N_=1 formula="=CONCATENATE($B1,$G1)"
_N_=2 formula="=CONCATENATE($B2,$G2)"
_N_=3 formula="=CONCATENATE($B3,$G3)"
They will also silently convert numbers to strings for you unlike when you apply a character function like trim() to them. But if your numbers are not integers or can get too big then you should use PUT() function to convert your numbers to string rather than letting SAS guess at what you want.
... View more