how code excel in vba? starting @ right of target.offset(0, -4).value = don't know how in vba: (text(today(), "mm") & text(today(), "dd") & text(today(), "yyyy")) & "-" . ival
this auto-incrimination records based on date. here entire code:
private sub worksheet_change(byval target range) if target.column = 6 application.enableevents = false target.offset(0, 2).value = date target.offset(0, 4).value = "open" dim ival integer ival = application.worksheetfunction.countif(range("h1:h5000"), date) target.offset(0, -4).value = (text(today(), "mm") & text(today(), "dd") & text(today(), "yyyy")) & "-" . ival application.enableevents = true end if end sub
hows work you.... assuming columns
private sub worksheet_change(byval target range) if target.column = 6 application.enableevents = false target.offset(0, 2).value = date target.offset(0, 4).value = "open" **dim ival integer ival = application.worksheetfunction.countif(range("h1:h5000"), date) target.offset(0, -4).value = format(date, "mmddyy") & "-" & format(ival, "000")** application.enableevents = true end if end sub
Comments
Post a Comment