Autofill from a named range to a unnamed destination in Excel using VBA -


i trying autofill named range right neighbour cells. original range contains combined cells , 4x4 cells in size. problem autofill-method needs destination:=range("...") , not take destination:=xlsameareatotheright.

the solution if like

range("origin").autofill destination:=( range("origin").area + rows(4) ), _                          type:=xlfilldefault 

so how can find rows , cols of named range in format a1:d4 , add 4 cols it?

thnks support!

i not sure want result, here answers particular questions:

you can range string in format $a$1:$d$4 using .address, , amount ofthe columns add .columns.count named range. (using offset should no problem add amount of columns active cell within range.)

dim testrange string dim amountcolumns integer  testrange = activeworkbook.sheets(1).range("test").address amountcolumns = activeworkbook.sheets(1).range("test").columns.count 

Comments