
need help in simple program, very simple
Quote:
> I need to write simple macro in excel, it would take range of cells, and
> fill them with next days of week/month, begining from actual date. Help i
> dont know how to fill next cells with that type of data.... I am just
> begining to program so please write as easiest as you can. thnx
Try this macro:
Range("F4:F18").Select ' F4:F18 -
range of cells to fill
Selection.NumberFormat = "m/d/yyyy" ' format of date
Range("F4").Select ' first cell
ActiveCell.FormulaR1C1 = "=NOW()" ' get now() function (actual
date)
Range("F4:F18").Select ' repeat selection
Selection.DataSeries Rowcol:=xlColumns, Type:=xlChronological, Date:= _
xlDay, Step:=1, Trend:=False ' fill with days
PawelT