Well, its useful if you put test data in the form of a datastep. I have made some code here quickly, it takes the netval from the max() of those before the netvalrange in the given row. You can change to fit your exact criteria.
input ProdNo $ Group NetVal;
A 1 -32
A 1 45
A 1 65
input ProdNo $ Group NetValRange Mvalue Tvalue;
A 1 0 0.005 0.009
A 1 22 0.004 0.6444
create table WANT as
(select max(NETVAL) from TABLE1 where PRODNO=T2.PRODNO and GROUP=T2.GROUP and NETVAL <= T2.NETVALRANGE) as NETVAL
from TABLE2 T2;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.