vba - Get first cell value after finding column header -


i want find first cell value after finding header.

currently have this:.

dim ulimitrange range dim llimitrange range ulimitrange = worksheets("sheet1").cells.find("upper limit", , xlvalues, xlwhole) llimitrange = worksheets("sheet1").cells.find("lower limit", , xlvalues, xlwhole)  ulimit = range("ulimitrange" & 1) llimit = range("llimitrange" & 1) 

however, returning "run-time error '91': object variable or block variable not set first line of code.

any

like this:

dim ulimitrange range dim llimitrange range set ulimitrange = worksheets("sheet1").cells.find("upper limit", , xlvalues, xlwhole) set llimitrange = worksheets("sheet1").cells.find("lower limit", , xlvalues, xlwhole)  set ulimit = ulimitrange.offset(1) set llimit = llimitrange.offset(1) 

comments:

  1. when setting range variables precede operation set statement
  2. if want move given range use offset procedure offset([rows], [columns])

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -