Feedback by UserVoice

kalecka

My feedback

  1. 120 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    An error occurred while saving the comment
    kalecka commented  · 

    To Stevenson Yu: Unfortunately, your proposal is not solving the main problem, as we want to avoid using LongFormula more than once, and in your idea it will have to be repeated in Value if True part to work correctly.

    As well as Richard, I think that ms@baccma's idea is great and could be a big step forward not only for IF statements, but much more excel calculations.

    An error occurred while saving the comment
    kalecka commented  · 

    Wow, I`m happy to see that more people have the same problem with duplicating long formulas while checking particular condition. I have a feeling that this improvement will speed up calculation a lot, and make formulas more clear for editors.
    I spend a while to create a vba alternative function to solve this, but I think it would be better implement globally by professionals :).

    In case it will note happen in the near future, please see below my alternative:

    Function IFTRUE(form, comp, ift) ''''' IFTRUE(statement, condition, statement if true)
    If form.Count > 1 Then
    IFTRUE = CVErr(xlErrRef)
    Exit Function
    End If

    Dim compL As Byte
    'If IsNumber(form.Value) Then
    If Mid(comp, 2, 1) = "=" Or Mid(comp, 2, 1) = ">" Then
    compL = 2
    ElseIf Left(comp, 1) = "<" Or Left(comp, 1) = ">" Or Left(comp, 1) = "=" Then
    compL = 1
    Else: compL = 0
    End If


    Select Case IIf(compL > 0, Left(comp, compL), "")
    Case "<"
    If form.Value < Right(comp, Len(comp) - 1) Then
    IFTRUE = ift
    Exit Function
    End If
    Case ">"
    If form.Value > Right(comp, Len(comp) - 1) Then
    IFTRUE = ift
    Exit Function
    End If
    Case "<>"
    If form.Value <> Right(comp, Len(comp) - 2) Then
    IFTRUE = ift
    Exit Function
    End If
    Case "<="
    If form.Value <= Right(comp, Len(comp) - 2) Then
    IFTRUE = ift
    Exit Function
    End If
    Case ">="
    If form.Value >= Right(comp, Len(comp) - 2) Then
    IFTRUE = ift
    Exit Function
    End If
    Case "="
    If form.Value = Right(comp, Len(comp) - 1) Then
    IFTRUE = ift
    Exit Function
    End If
    Case Else
    If form.Value = comp Then
    IFTRUE = ift
    Exit Function
    End If
    End Select

    IFTRUE = form.Value

    End Function

    kalecka supported this idea  · 
  2. 4 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    kalecka supported this idea  · 
  3. 65 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    kalecka supported this idea  · 

Feedback and Knowledge Base