loops - VBA to increase the year after it finds a D -


i have data j14(january 14) until d14 in column c2:c13. want date increase 1 each time ran goes d14 j15 f15 etc sheet 5 contains j-d in column a1:12 , 14 in b1:b12 range c2:c13 drop down 1 each run also

below have works jan15

sub test()  dim srchrng range, cel range dim lastrow string  lastrow = activesheet.cells(rows.count, "c").end(xlup).row + 1  set srchrng = range("c2:c13")  each cel in srchrng if instr(1, cel.value, "d") > 0     cel.offset(1, 50).value = range("c" & lastrow).select activecell.formula = "=sheet5!a1&sheet5!b1+1" end if next cel  end sub 


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -