Script works, but the values for "productID"(Col C6) and "measureID" (Col C7) can be different in different datasets, but always have a maximum range from 0-9 and 0-5, respectively. My script will produce a lot of workbooks/worksheets with no content at all, if or example only productID 0 and 2 are there, since it creates a worksheet for ProductIDs 0-9 all the time.
How can i implement an if condition, that only extracts the data if the product ID is existent in the data? Same for the downstream process of extracting measureID?
Thanks for your help guys!
1 L A T E S T R E P L I E S (Newest First)
greg
Posted - 10/06/2014 : 09:06:36 AM You can use the vfind X-Function to test if a value exists in a dataset:
dataset dsIndex; vfind ix:=col(C6) value:=$(ii) ox:=dsIndex; if(dsIndex.GetSize() > 0) { // code to run when you find a value } else { // code to run when value not found }