View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default equal size columns [same no. of rows]

non-vba - just drag down the last cell (say, row 6) to where you need
to go (row 15), thereby autofilling.

in vba (untested), something like

sub fill_all_rows()

dim col as integer
dim c as range
dim iLastRow as integer
dim rmyrange as range

set rmyrange = worksheet.range("a1:f15") 'for instance
set col = 1

for each col in rmyrange

do until c.row = 16
for each c in col
if c <"" then
'do nothing
else
c = c.offset(-1,0).value 'might need to be c.value =
c.offset(-1,0).value
end if
next c

next col

end sub


hope it (at least) gets you started!
:)
susan




On May 9, 8:33 am, wrote:
hello everyone

i want to ask a question tried to slove them but as i m
novice so havnt solved so far

i have data in column1 to n the data in each is of different length/
diff number of rows
are present

i want to make all coulumns are of same size

say if 1 column has data in 15 rows n
another column2 hav data in 6
rows
[so i want to copy data of 6 row in all the rows upto 15] and
some other column hav data in 10 rows ..[so i want to copy data of 6
row in all the coumns upto 15] so want them to make equal length