Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1104to1108
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Excel Function problem mit If Schleife

Excel Function problem mit If Schleife
MaxKuba
Hallo Kollegen,
wisst Ih warum meine Function hier nicht so rechnet wie ich das will? Poblem ist das ich bei der If schleife eine ausnahme eingebaut habe, wenn nicht alle Felder groesser 0 sind dann soll angezeigt werden "NOT ALL CELLS > 0". Leider macht er das auch obwohl alle groesser 0 sind. Meint Ihr das es an Variant liegt?
Gruesse, Max
  • 
    Public Function APR_PCT( _
    PRC_CY As Variant, _
    PRC_NY As Variant, _
    QTY_NY As Variant, _
    PU As Variant)
    Dim APR As Variant
    If (PRC_CY And PRC_NY And QTY_NY And PU) > 0 Then
    APR = (PRC_NY - PRC_CY) * QTY_NY / PU
    APR_PCT = APR / (PRC_NY * QTY_NY / PU)
    Else
    APR_PCT = "NOT ALL CELLS > 0"
    Exit Function
    End If
    End Function
    

  • https://www.herber.de/bbs/user/64680.xls

    1
    Beitrag zum Forumthread
    Beitrag zu diesem Forumthread

    Betreff
    Benutzer
    Anzeige
    AW: Excel Function problem mit If Schleife
    25.09.2009 07:26:11
    MaxKuba
    Habs schon geloest mit
  • 
    Public Function APR_PCT( _
    PRC_CY As Double, _
    PRC_NY As Double, _
    QTY_NY As Double, _
    PU As Double)
    Dim APR As Double
    If PRC_CY > 0 And PRC_NY > 0 And PRC_NY > 0 And QTY_NY > 0 And PU > 0 Then
    APR = (PRC_NY - PRC_CY) * QTY_NY / PU
    APR_PCT = APR / (PRC_NY * QTY_NY / PU)
    Else: APR_PCT = "NOT ALL CELLS > 0"
    End If
    End Function
    

  • Anzeige

    Beliebteste Forumthreads (12 Monate)

    Anzeige

    Beliebteste Forumthreads (12 Monate)

    Anzeige
    Anzeige
    Anzeige