2- Aşağıdaki makroyu excel de çalışacak şekilde yazınız ve deneyiniz
Sub deneme()
Range("a1").Value = dortislem(10, 10, "topla")
End Sub
Public Function dortislem(sayı1, sayı2, komut)
If komut = "topla" Then
dortislem = sayı1 + sayı2
End If
If komut = "çıkarma" Then
dortislem = sayı1 - sayı2
End If
If komut = "çarpma" Then
dortislem = sayı1 * sayı2
End If
If komut = "bölme" Then
dortislem = sayı1 / sayı2
End If
End Function
Bir ödevim var ama hakikaten acil. Yardımcı olabilirseniz çok sevinirim.
Teşekkürler...
Sub deneme()
Range("a1").Value = dortislem(10, 10, "topla")
End Sub
Public Function dortislem(sayı1, sayı2, komut)
If komut = "topla" Then
dortislem = sayı1 + sayı2
End If
If komut = "çıkarma" Then
dortislem = sayı1 - sayı2
End If
If komut = "çarpma" Then
dortislem = sayı1 * sayı2
End If
If komut = "bölme" Then
dortislem = sayı1 / sayı2
End If
End Function
Bir ödevim var ama hakikaten acil. Yardımcı olabilirseniz çok sevinirim.
Teşekkürler...
