Excel2010怎样创建自定义函数?为了提高工作率想学习的朋友们就来看看吧,本文就是小编给大家带来的方法。
1、在功能区设置出excel 开发工具选项。默认的excel的开发工具选项不在功能区里显示,所以需要我们手动设置。打开excel文件,依次点击“ 文件”->"选项"。 在弹出的对话框里,点击“ 自定义功能区 ”,在右侧的“自定义功能区”下拉列表里选择“主选项卡”,然后勾选“ 开发工具 ”,点击“ 确定”


2、在“开发工具”选项卡里,点击“ Visual Basic ”

3、在 VBA编辑窗口,“ 工程窗口下 ”点击“ VBAproject(工作簿的名称 )”, 右键:“ 插入”->"模块 "

4、编写函数代码,保存函数。在弹出的对话框里点击:“是”,以求圆的面积函数为例:
代码如下:
Function ss(r) ss = 3.14 * r ^ 2End Function

5、调试验证结果。在sheet1的A1单元格输入4,B1单元格输入公式 =ss(A1)

以上就是Excel2010怎样创建自定义函数的全部内容,希望可以帮助到大家。