MACRO ################################################################# # Date version Author Note # 2014/04/01 v.01 Andrew Lee # # #---------------------------------------------------------------- # # This macro is used to transfer the arrangement of dataset from # third party worksheet (Excel) to Minitab. # ################################################################# # # Neither Minitab, Inc. nor the author(s) of this MACRO makes any claim # of or offers any Warranty whatsoever with regard to the accuracy of # this MACRO or its suitability for use. Minitab, Inc. and the author(s) # of this MACRO each hereby disclaims any Warranty and/or liability with # respect thereto. # ################################################################# GRRTrans d.1-d.n oper; STORE sPart sOper sMeas; TOLERANCE tl. MCOLUMN d.1-d.n oper sPart sOper sMeas MCOLUMN uniq freq nmCol MCONSTANT tl i nmpart.1-nmpart.n MRESET BRIEF 0 NOECHO NOTITLE DO i=1:n KKNAME nmpart.i d.i LET nmCol[i] = nmpart.i ENDDO ROWTOC d.1-d.n sMeas; CSubs sPart; Expand oper; Exstore sOper. VORDER sPart; VALUE nmCol. BRIEF 1 NOTE Transform completed! BRIEF 0 IF STORE = 0 NAME sPart 'Part.' sOper 'Opers.' sMeas 'Meas.' ENDIF TITLE BRIEF 2 IF TOLERANCE = 0 GAGERR; PART sPart; OPER sOper; Resp sMeas. ELSE GAGERR; PART sPart; OPER sOper; Resp sMeas; TOLE tl. ENDIF ENDMACRO