excel vba - How to copy intersected data within a variable range? -
my sheet has data's chiller 14 days. column time of data collection, 00:00:00 23:59:00. data collected every minute. therefore each row 1 minute. i'm using user form operating hours of chillers.
okay here problem:
- set range operating hours
- prompt user column containing data need.
- which ever data in column specified user within operating hours range copied workbook.
** note user's chiller operating hours may differ different chillers. ** note code below not work. not select data whatsoever
this coding tried
sub try() dim strtime, endtime string dim rfoundstrt, rfoundend, orange range strttime = userform1.textbox9.text endtime = userform1.textbox10.text on error resume next sheet1 set rfoundstrt = .columns(1).find(what:=strtime, after:=.cells(1, 1), lookin:=xlvalues, lookat:=xlpart, searchorder:=xlbyrows, searchdirection:=xlnext, matchcase:=false _ , searchformat:=false).entirerow.select end on error resume next sheet1 set rfoundend = .columns(3).find(what:=endtime, after:=.cells(1, 1), lookin:=xlvalues, lookat:=xlpart, searchorder:=xlbyrows, searchdirection:=xlnext, matchcase:=false _ , searchformat:=false).entirerow.select end orange = range(rfoundstrt, rfoundend).select end sub
Comments
Post a Comment