excel - Syntax error in subroutine 'Test' -


i have following sub function in vba:

sub test()     index_match_array(range("d5").value,range("bz:bz").dataseries,"hardware",1,2) end sub 

this calls function starts:

option explicit function index_match_array(loookup string, table_array range, criteria_search string, criteria_line_add integer, return_line_add integer) string()  dim lookup_array() string dim result_array() string ... ... index_match_array = result_array  end function 

when compile error message:

compile error: syntax error

i suspect it's second parameter, range one, i'm not sure?

' data series return type variant , change table_array variant ' function in array, change function index_match_array string

option explicit sub test()      dim sstring(10) string     sstring(1) = index_match_array(range("d5").value, range("bz:bz").dataseries, "hardware", 1, 2)  end sub   function index_match_array(loookup string, table_array variant, criteria_search string, criteria_line_add integer, return_line_add integer) string  dim lookup_array(10) string dim result_array(10) string  result_array(1) = "test value"  index_match_array = result_array(1)  end function 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -