excel vba - fill a range until a certain value is reached -


is there way in vba fill range until value reached?

for example, want fill column dates starting value in cell b1 (let’s 1/1/2014) till reaches value in cell c1 (let’s 1/15/2014) stepping 1 day.

is possible please?

thank u.

here proposition, put dates in b1 , c1 cells , run "dates" macro.

sub dates()  dim startdate date dim enddate date dim row double  startdate = range("b1").value enddate = range("c1").value row = 0  range("a1").select until dateadd("d", 1, startdate) = enddate + 1     activecell.offset(row, 0).value = dateadd("d", 1, startdate)     startdate = startdate + 1     row = row + 1 loop  end sub 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -