第一范文网 - 专业文章范例文档资料分享平台

原创—EXCEL VBA SPC自定义函数包括CPK PPK CP……

来源:用户分享 时间:2025/6/3 5:18:17 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

As Integer, Optional SEE As Integer) As Variant

Dim AV As Single, T As Single, Su As Single, SE As Single, k As Single T = USL - LSL k = USL + LSL AV = k / 2

If SEE = 0 Then SE = T / CPK / 6 Else

SE = T / CPK / SEE End If

Su = Application.WorksheetFunction.RoundUp(0.0000000000001, WS) If JRS = 0 Then RANDS =

Application.WorksheetFunction.RoundUp(Application.WorksheetFunction.Ceiling(Application.WorksheetFunction.NormInv(Rnd(), AV, SE), Su), WS) End If

If JRS = 2 Then RANDS =

Application.WorksheetFunction.RoundUp(Application.WorksheetFunction.Ceiling(Application.WorksheetFunction.NormInv(Rnd(), AV, SE), Su * 2), WS) End If

If JRS = 1 Then RANDS =

Application.WorksheetFunction.RoundUp(Application.WorksheetFunction.Ceiling(Application.WorksheetFunction.NormInv(Rnd(), AV, SE), Su * 2) + Su, WS) End If

End Function

'***************************************功能: 函数帮助文件 Sub Fuhelp(control As IRibbonControl) Dim 函数名称 As String '函数名称 Dim 函数描述 As String '函数描述 Dim 函数类别 As String '函数类别

Dim 参数个数(2) As String '函数参数描述 数组 个数 Dim arr()

函数类别 = \品质使用函数\

参数个数(0) = \函数参数第1个,规格上限\ 参数个数(1) = \函数参数第2个,规格下限\

参数个数(2) = \函数参数第3个,用于计算的数据区域\ ReDim arr(1 To 4)

arr = [{\ For i = 1 To 4

Call Application.MacroOptions(Macro:=arr(i), Description:=函数描述, Category:=函数类别, ArgumentDescriptions:=参数个数) 函数名称 = arr(i)

函数描述 = \返回数据的\函数名称 & \值\

Next i End Sub

原创—EXCEL VBA SPC自定义函数包括CPK PPK CP…….doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c2348g30je977xpo5846y5ap1c1kzfj00qgc_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top