关于A列 B列 C列
S 4 =?
H 5 =?
O 10 =?
C=A*B(当A列中只要出现S就自动乘以8.1,当出现H就乘以1.6,当出现O时就乘以1)。请问这样的函数公式?
的问题
if(a1=”S”,b1*8.1,if(a1=”H”,b1*1.6,if(b1)))
..如果是说单元格里只要出现特定的字母就算的话那得自已定义函数了…
=aa(a1,b1)
Function aa(ad As String, bb As Integer) As Integer
If InStr(ad, “s”) Then aa = bb * 8.1 ‘自定义函数是写在模块里的….
If InStr(ad, “h”) Then aa = bb * 1.6
If InStr(ad, “0”) Then aa = bb
End Function