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:

  1. set range operating hours
  2. prompt user column containing data need.
  3. 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 

samplae data

sample userform


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -