Drag and Fill with VBA

  • Thread starter Thread starter Mr.J
  • Start date Start date
M

Mr.J

In C2 I have a cell with the formula =K2&N2

I create a macro that does some minor formatting to the data but what
I would like it to also do is to put that formula in all the remaining
rows in the column. (ie C3 would be =K3&N3). I figure out how to do
it in a range like C2:C:2000 but what I want it to do is to do it only
to the rows with data in it. Say the first 800 rows have data it would
do it to C2 to C800, if 5000 rows of data then c2 to c 5000.
Thanks,
zabctrader @ yahoo.co
 
If the column with data is A, then
Sub AllInOneLine(
Range("A:A").Specialcells(xlcelltypeconstants).offset(0,2).formulaR1C1="=rc[8]&rc[11]
End Su

----- Mr.J wrote: ----

In C2 I have a cell with the formula =K2&N

I create a macro that does some minor formatting to the data but wha
I would like it to also do is to put that formula in all the remainin
rows in the column. (ie C3 would be =K3&N3). I figure out how to d
it in a range like C2:C:2000 but what I want it to do is to do it onl
to the rows with data in it. Say the first 800 rows have data it woul
do it to C2 to C800, if 5000 rows of data then c2 to c 5000.
Thanks
zabctrader @ yahoo.c
 
Back
Top