如果总存款表小于总费用表,我想要下面的Excel表格 - 它会自动减去经理获取< / strong>表格,如果总存款表格大于总费用表格 - 它会自动减去客户获取表格。如果总费用&amp; 总计 存款等于客户获取和经理获取表格显示否过期强烈>。我非常抱歉,我无法上传excel snap-short图片,因为我声名狼借。但我是通过HTML代码完成的。为了澄清我的问题,请运行代码
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 2px;
}
</style>
</head>
<body>
<table style="width:100%">
<tr>
<th>Total Cost</th>
<th>Total deposit</th>
<th>Customer Get</th>
<th>Manager Get</th>
</tr>
<tr>
<td>2700</td>
<td>2500</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>2500</td>
<td>2900</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>2300</td>
<td>2300</td>
<td>-</td>
<td>-</td>
</tr>
</table>
</body>
</html>
&#13;
答案 0 :(得分:1)
所以看来你有三个条件:
如果总存款表小于总费用表 - 它会自动减去经理获取表
如果总存款表大于总费用表 - 它是 自动减去客户获取表
如果总费用&amp; 总存款等于客户获取和经理获取表格否过期
我相信我们可以使用2个公式来实现这一点。假设数据从A1开始:
客户获取的公式:
=IF(B2>A2,B2-A2,IF(B2=A2,"NO Due","-"))
经理获取的公式:
=IF(B2<A2,A2-B2,IF(B2=A2,"NO Due","-"))
然后,您可以自动填充公式:
Total Cost Total deposit Customer Get Manager Get
2700 2500 =IF(B2>A2,B2-A2,IF(B2=A2,"NO Due","-")) =IF(B2<A2,A2-B2,IF(B2=A2,"NO Due","-"))
2500 2900 =IF(B3>A3,B3-A3,IF(B3=A3,"NO Due","-")) =IF(B3<A3,A3-B3,IF(B3=A3,"NO Due","-"))
2300 2300 =IF(B4>A4,B4-A4,IF(B4=A4,"NO Due","-")) =IF(B4<A4,A4-B4,IF(B4=A4,"NO Due","-"))
结果如下:
Total Cost Total deposit Customer Get Manager Get
2700 2500 - 200
2500 2900 400 -
2300 2300 NO Due NO Due