excel - Querying SQL server that contains ranges of data -
i have connection sql server via excel 2007. data looks like:
a0001-a9999,x9999-x9999 | 1234 b0001-b9999 | 5678 c0001-c4999 | 1111 c4500-c4999 | 1112 c5000-c9999,d0001-d9999 | 2222 ...
the first column range of values second column value should outputted. examples: input of "c4000" return "1111", , input of "c4600" return "1111,1112".
how write code allow user of form enter 1 input in cell on worksheet , output in cell? idea hit button activate macro truncate data , report results. proficient in writing vba code , prefer use that, otherwise not adverse trying learn sql.
the user in case knows put letter followed 4 numbers input. not have ability edit data in table, pull sql server.
the question vague tools want use. solution not sql solution. can set powerpivot in excel accomplish this.
Comments
Post a Comment