Sunday, 15 February 2015

vba - Set the cell value equal to the bottom cell, if the value date is less than threshold -



vba - Set the cell value equal to the bottom cell, if the value date is less than threshold -

i need 2 things:

count number of dates before 01/01/2014 in column (k:k) substitute cells date before 01/01/2014 bottom date.

example: yellowish highlighted rows have equal greenish highlighted one.

a link!

my code:

' conta di valori che sono precedenti al 01/01/2014 ival1 = application.worksheetfunction.countif(range("k1:k65000"), "<41640") until > ival1 msgbox ival1 ' imposta tutte le righe che hanno come info minore al 01/01/2014 la cella successiva set datarange = range("k1:k65000") each cell in datarange.cells if cell.value < 41640 cell.select activecell.offset(1, 0).select range(activecell, activecell.offset(0, 1)).copy activecell.offset(-1, 0).select activesheet.paste application.cutcopymode = false end if next = + 1 loop

no debug. interrupts in never ending process after message box

vba countif

No comments:

Post a Comment