Kalau dikatakan "Menghitung banyaknya Operator Plus (+); kayaknya
kurang tepat, karena PLUS nya ada dua, hasil yg dikehendaki tiga.
Mungkin lebih tepat: Menghitung Banyaknya OPERANDS
Operand adalah data (bilangan) yg dioperasikan dengan Operator.
misal didalam formula 2+3+4-1*7 terdapat 5 operands dan 4 operator.
Untuk menghitung banyaknya Operand pada formula di B3, bisa dipakai Fungsi
=OperandCount(B3)
OperandCount tidak hanya membedakan "+" tetapi juga operator lain: + - / * ^
Sayangnya Fungsi Operandcount belum ada di Excel, makanya harus
dibuat sendiri spt ini:
Function OperandCount(d As Range) As Long
Dim opeArr, formo
If d.HasFormula Then
formo = d(1, 1).Formula
formo = Replace(formo, "+", "\")
formo = Replace(formo, "-", "\")
formo = Replace(formo, "*", "\")
formo = Replace(formo, "/", "\")
formo = Replace(formo, "^", "\")
opeArr = Split(formo, "\")
OperandCount = UBound(opeArr) + 1
Else
OperandCount = 0
End If
End Function
Dim opeArr, formo
If d.HasFormula Then
formo = d(1, 1).Formula
formo = Replace(formo, "+", "\")
formo = Replace(formo, "-", "\")
formo = Replace(formo, "*", "\")
formo = Replace(formo, "/", "\")
formo = Replace(formo, "^", "\")
opeArr = Split(formo, "\")
OperandCount = UBound(opeArr) + 1
Else
OperandCount = 0
End If
End Function
----- Original Message -----
From: Adrian I. Soetomo
To: XL-mania@yahoogroup
Sent: Saturday, October 24, 2009 11:37PM
Subject: ]] XL-mania [[ Mencari Tanda + dalam suatu Rumus
Dear Para Suhu XL-Mania,
Newbie mohon bantuan utk menemukan cara yg tepat mencari tanda "+" dalam suatu rumus sehingga bisa mengetahui banyaknya peenjumlahan yg terjadi di sel tsb.
Atas bantuannya disampaikan terima kasih..
-Adrian-
Get more done like never before with Yahoo!7 Mail. Learn more.
__._,_.___
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| Moderasi akan lambat minggu ini, momods pergi ke tempat jauh |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message, melecehkan, tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/ |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau... |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html |
+-------------------------------------------------------------------+
| Message lama ada di : |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id] |
| http://www.mail-archive.com/xl-mania@yahoogroups.com |
+-------------------------------------------------------------------+
| Moderasi akan lambat minggu ini, momods pergi ke tempat jauh |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message, melecehkan, tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/ |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau... |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html |
+-------------------------------------------------------------------+
| Message lama ada di : |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id] |
| http://www.mail-archive.com/xl-mania@yahoogroups.com |
+-------------------------------------------------------------------+
MARKETPLACE
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
.
__,_._,___
Nenhum comentário:
Postar um comentário