B2)回车向下填充(图2)
时间:2023-11-07 00:02:30
本月公司员工的工资要调整,经理要求按每个人的职称来加工资。具体要求:职称为初级的本月加20元,职称为中级的本月加50元,职称为高级的本月加70元。但是因为公司人数太多,逐个添加不但麻烦还容易出错。
经过一些摸索,我找到两种方法在Excek中高效解决按职称分级加工资这个问题。
方法一:运用条件函数If
第一步:打开工资表,在实发工资下面输入=IF(B2=“初级”,G2+20,IF(B2=“中级”,G2+50,IF(B2=“高级”),G2+70))。
注:(B2代表职称;G2代表应发工资,图1)。
第二步:回车,向下快速填充即可。
方法二:运用Visual Basic编辑器
第一步:工具→宏→Visual Basic编辑器。
第二步:在Sheet!上右击→插入→模块。
第三步:输入如下代码
以下是引用片段:
Function sss(tatol, ss)
If ss = “初级” Then
sss = tatol+20
ElseIf ss = “中级” Then
sss = tatol+50
ElseIf ss = “高级” Then
sss = tatol+70
End If
End Function
注:代码解释:sss代表函数名;tatol代表实发工资;ss代表应发工资。
第四步:关闭Visual Basic编辑器→在实发工资下输入=sss(G2,B2)→回车向下填充(图2)。
标签:代表,实发,工资,职称,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win10平板模式无法退出怎么办?Win10平板模式无法退出的解决方法
2023-06-17 18:20:39
![](https://img.aspxhome.com/file/2023/2/52782_0s.jpg)
word 如何生成目录 Word排版快速自动生成目录
2023-05-07 17:05:21
![](https://img.aspxhome.com/file/2023/7/33497_0s.gif)
Win10打印文件时挂起怎么办?Win10打印文件时挂起的解决方法
2023-04-06 02:47:52
![](https://img.aspxhome.com/file/2023/2/52742_0s.jpg)
word的标尺不见了怎么办?
2023-12-10 13:57:51
Win10 19H1上线Microsoft Defender ATP防篡改功能
2023-05-23 16:04:27
![](https://img.aspxhome.com/file/2023/4/a310388_0s.jpg)
Win10任务栏无法点击怎么办?Win10任务栏无法点击解决教程
2022-01-24 11:03:32
![](https://img.aspxhome.com/file/2023/26/a220107_0s.png)
u盘插上电脑没反应,详细教您修复无法识别u盘问题
2022-03-24 23:54:28
![](https://img.aspxhome.com/file/2023/2/a290884_0s.png)
格式工厂中怎么添加字幕?格式工厂添加字幕的方法
2022-12-15 02:35:50
![](https://img.aspxhome.com/file/2023/8/a333936_0s.jpg)
Word2007怎么自动生成目录?
2023-10-26 11:26:37
![](https://img.aspxhome.com/file/2023/9/31349_0s.gif)
pcsx2模拟器怎么设置键盘?pcsx2键盘按键设置教程
2022-12-18 11:21:36
![](https://img.aspxhome.com/file/2023/30/a269796_0s.png)
电脑插入U盘打开后提示压缩zipped文件夹窗口的解决方法
2022-08-06 09:06:24
![](https://img.aspxhome.com/file/2023/2/a290553_0s.jpg)
word进行缩印的方法?
2022-01-14 18:55:40
![](https://img.aspxhome.com/file/2023/0/a167890_0s.png)
咚漫漫画如何评论留言?咚漫漫画评论留言的方法
2022-08-17 18:13:40
![](https://img.aspxhome.com/file/2023/8/a336699_0s.jpg)
让PPT中数据图表更生动的制作方法
2022-10-30 06:04:18
如何对 App Store 上购买的项目退款?
2022-08-26 16:07:33
![](https://img.aspxhome.com/file/2023/3/a198033_0s.jpg)
怎么修复Win11开启Windows终端错误提示"找不到文件wt.wxw"
2023-11-23 15:59:46
![](https://img.aspxhome.com/file/2023/28/a240544_0s.jpg)
在Word2010中保存文档的技巧总结
2023-09-03 12:57:52
![](https://img.aspxhome.com/file/2023/6/25026_0s.jpg)
word如何插入目录超链接
2023-08-10 13:55:00
![](https://img.aspxhome.com/file/2023/9/34999_0s.png)
word如何快速手动生成目录
2023-02-28 03:35:03
安卓微信如何降级为旧版本?
2023-09-29 12:35:07