If函数无数层判断与VBA初级教程

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

If函数无数层判断与VBA初级教程2006-12-0912:51:536副:chenhuafu(295148360)下面是讲if的无数层判断,超越7层函数的限制,大家要安静,现在从头来2006-12-0912:52:406副:chenhuafu(295148360)选中A2,Ctrl+F3或者单击插入-名称先马上做这一步2006-12-0912:54:13折扇轻摇(113207361)做好了2006-12-0912:54:206组:249696926(249696926)OK2006-12-0912:55:096副:chenhuafu(295148360)输入:名称输入:=if(a2=9,99,if(a2=10,100,if(a2=11,110,if(a2=12,120,if(a2=13,130,if(a2=14,140,if(a2=15,150,if(a2=16,160,名称2))))))))单击添加2006-12-0912:55:52四组:忆(122010775)哦,明白了,继续。。。2006-12-0912:56:10折扇轻摇(113207361)还是请组长讲自定义吧2006-12-0912:56:19HAHA(18330204)6组组长,有个问题,讲课是否有讲义,课下复习2006-12-0912:56:406组:appletree(515962275)课完成后共享下载2006-12-0912:57:066副:chenhuafu(295148360)大家不想学习if的无数层判断吗?2006-12-0912:57:186组:appletree(515962275)现在安静,请老师继续2006-12-0912:57:216副:chenhuafu(295148360)谁再不安静,踢了2006-12-0912:57:266副:chenhuafu(295148360)从头开始2006-12-0912:58:206副:chenhuafu(295148360)选中B1单元格单击插入-名称或者Ctrl+F32006-12-0912:59:256副:chenhuafu(295148360)在弹出的对话框中输入名称在引用位置输入:=if(a1=9,99,if(a1=10,100,if(a1=11,110,if(a1=12,120,if(a1=13,130,if(a1=14,140,if(a1=15,150,if(a1=16,160,名称2))))))))大家可以复制上面的公式2006-12-0912:59:376副:chenhuafu(295148360)然后单击添加2006-12-0913:01:156副:chenhuafu(295148360)再输入:名称2:引用位置输入:=if(a1=17,170,if(a1=18,180,if(a1=19,190,if(a1=20,200,if(a1=21,210,if(a1=22,220,if(a1=23,230,if(a1=24,240,名称3))))))))单击添加2006-12-0913:02:516副:chenhuafu(295148360)再输入:名称3:引用位置输入:=if(a1=25,250,if(a1=26,260,if(a1=27,270,if(a1=28,280,if(a1=29,290,if(a1=30,300,if(a1=31,310,if(a1=32,320,))))))))单击添加暂时添加到此2006-12-0913:04:496副:chenhuafu(295148360)然后在B1单元各中输入=if(a1=1,11,if(a1=2,22,if(a1=3,33,if(a1=4,44,if(a1=5,55,if(a1=6,66,if(a1=7,77,if(a1=8,88,名称))))))))接着在A1单元格中输入1-32的数字,看会得到什么东西教程到此结束2006-12-0913:04:546副:chenhuafu(295148360)可以出声了2006-12-0913:05:126副:chenhuafu(295148360)可以复制上面的公式2006-12-0913:06:016组:轻歌曼舞(326106544)我这里提示说循环引用哦2006-12-0913:06:061组:欢欢乐乐(461699029)6组:chenhuafu6组:chenhuafu6组:chenhuafu6组:chenhuafu6组:chenhuafu6组:chenhuafu6组:chenhuafu6组:chenhuafu6组:chenhuafu2006-12-0913:06:076组:轻歌曼舞(326106544)我是照你的方法做的2006-12-0913:06:18折扇轻摇(113207361)是不是这样就可以打破IF的7层判断限制啊??2006-12-0913:06:201组:欢欢乐乐(461699029)开办vba组把2006-12-0913:06:271组:欢欢乐乐(461699029)开办vba组把2006-12-0913:06:291组:欢欢乐乐(461699029)开办vba组把2006-12-0913:06:316副:chenhuafu(295148360)选中B1单元格啊,怎么会循环引用??2006-12-0913:06:336组:轻歌曼舞(326106544)[:*]欢乐2006-12-0913:06:531组:欢欢乐乐(461699029)组:chenhuafu开办vba组把2006-12-0913:07:05折扇轻摇(113207361)请问:轻歌曼舞是不是这样就可以打破IF的7层判断限制啊??2006-12-0913:07:156副:chenhuafu(295148360)32层了2006-12-0913:07:236副:chenhuafu(295148360)超过7层的多少倍2006-12-0913:07:34飘雪·席(369007073)请问:各个组研究的方向不一样吗?2006-12-0913:07:446副:chenhuafu(295148360)问兰版阿2006-12-0913:07:511组:欢欢乐乐(461699029)6组:chenhuafu大哥,,,,开办vba组把2006-12-0913:07:51折扇轻摇(113207361)我知道超了很多,是不是这个意思啊2006-12-0913:07:591组:欢欢乐乐(461699029)6组:chenhuafu大哥,,,,开办vba组把2006-12-0913:08:096副:chenhuafu(295148360)你试试不就知道了吗2006-12-0913:08:24折扇轻摇(113207361)我试了啊发现是这样的啊2006-12-0913:09:126副:chenhuafu(295148360)还可以无限次判断下次名称3:引用位置输入:=if(a1=25,250,if(a1=26,260,if(a1=27,270,if(a1=28,280,if(a1=29,290,if(a1=30,300,if(a1=31,310,if(a1=32,320,名称4))))))))单击添加名称4:=if(if(if(……,……,名称5)))))2006-12-0913:09:14飘雪·席(369007073)但嵌套的多了要影响速度啊2006-12-0913:09:281组:欢欢乐乐(461699029)没有反应2006-12-0913:09:521组:欢欢乐乐(461699029)看来和一组一样,没有特别的2006-12-0913:10:076组:appletree(515962275)6副:chenhuafu,示例有没?2006-12-0913:10:086副:chenhuafu(295148360)VBA办入门兰版不是要几个好贴子吗?先看看那个啊,不懂再问2006-12-0913:10:136组:appletree(515962275)传共享中吧2006-12-0913:10:316副:chenhuafu(295148360)我上穿例子,自己跟着做还不行?2006-12-0913:10:511组:欢欢乐乐(461699029)早看来,希望群组上课2006-12-0913:11:001组:欢欢乐乐(461699029)群主上课2006-12-0913:11:181组:欢欢乐乐(461699029)工作表有那些事件2006-12-0913:11:186组:轻歌曼舞(326106544)请问定义名称前,是不是一定要选择好光标所在单元格的位置?2006-12-0913:13:026组:249696926(249696926)在引用位置那只能用输入吗?也可以导入吧?2006-12-0913:13:501组:欢欢乐乐(461699029)请办公高手上课2006-12-0913:14:196副:chenhuafu(295148360)例子上传了if函数32层判断2006-12-0913:14:501组:欢欢乐乐(461699029)请求办公高手上课上vba第一课2006-12-0913:14:581组:欢欢乐乐(461699029)好吗?2006-12-0913:15:22四组:忆(122010775)我也好想学,2006-12-0913:15:236副:chenhuafu(295148360)那就跟着来,2006-12-0913:17:006副:chenhuafu(295148360)画一个矩形框,懂不懂,用绘图工具画一个矩形框右击矩形框,指定宏,单击“新建”2006-12-0913:17:171组:欢欢乐乐(461699029)懂2006-12-0913:17:21四组:忆(122010775)等等,慢一点,是打开宏还是画矩形啊2006-12-0913:17:411组:欢欢乐乐(461699029)新建工作表2006-12-0913:17:49四组:忆(122010775)画好了,2006-12-0913:17:511组:欢欢乐乐(461699029)画图的2006-12-0913:17:581组:欢欢乐乐(461699029)矩形2006-12-0913:18:036副:chenhuafu(295148360)就会进入了VBE窗口Sub矩形2_单击()EndSub在中间输入msgboxHello,六组的同志们!2006-12-0913:18:05四组:忆(122010775)出来了,然后呢,2006-12-0913:18:226组:轻歌曼舞(326106544)老师,你用一种特殊一点的字体和颜色好吗,看不到你的话2006-12-0913:18:266组:249696926(249696926)不是用窗体画吗?2006-12-0913:18:356副:chenhuafu(295148360)变成Sub矩形2_单击()msgboxHello,六组的同志们!EndSub2006-12-0913:19:106副:chenhuafu(295148360)然后关闭VBE窗口,回到Excel界面单击矩形框,会有什么出来?2006-12-0913:19:38四组:忆(122010775)要保存不?还是直接退出2006-12-0913:20:106组:轻歌曼舞(326106544)会弹出一个窗口,上面写“HELLO,六组的同志们”2006-12-0913:20:166副:chenhuafu(295148360)画一个矩形框,懂不懂,用绘图工具画一个矩形框右击矩形框,指定宏,单击新建就会进入了VBE窗口Sub矩形2_单击()EndSub在中间输入msgboxHello,六组的同志们!变成Sub矩形2_单击()msgboxHello,六组的同志们!EndSub然后关闭窗口,回到Excel界面单击矩形框,会有什么出来?2006-12-0913:20:356副:chenhuafu(295148360)msgbox是一个显示信息框的函

1 / 20
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功