3 Replies Latest reply on Apr 30, 2012 10:06 AM by philmodjunk

    Help with If/Then formula

    RickKughen

      Title

      Help with If/Then formula

      Post

      Hello,

      I am new to using Filemaker. I am a baseball card collector and I have managed my baseball card collection in an Excel worksheet for a long time. As you can imagine, that worksheet has gotten unwieldy, so I upgraded to Filemaker Pro 12.

      What I am trying to do is this:

      1. Each card is assigned a value, such as MINT, VERY GOOD, EXCELLENT, etc.  This condition is chosen from a drop down menu in one of my fields.

      2. Each card has a book value based on the card being in perfect condition. I am entering this manually for each card as a dollar amount.

      3. I would like for another field to show the book value adjusted by condition of the card. For instance, if a card has a book value of $10 and the card is in VERY GOOD condition, the value would be adjusted accordingly.

      In my Excel database, I set up a If/Then function like this:

      =IF(I32="VG",N32*0.5,IF(I32="EX",N32*0.75,IF(I32="EXMT",N32*1,IF(I32="MINT",N32*1.5,IF(I32="P",N32*0.1,IF(I32="G",N32*0.25,IF(I32="F",N32*0.15,C1*4)))))))

      Is it possible to do something similar in Filemaker? I have tried a variety of different formulas, but have not been able to make it work.

      Thank you for your help!

      - rick

       

       

        • 1. Re: Help with If/Then formula
          Sorbsbuster

          A case statement is much nicer.  Eg, for the field CardValue:

          Case (

          Condition = "VG" ; BookValue * 0.5 ;

          Condition = "EX" ; BookValue * 0.75 ;

          Condition = "EXMT" ; BookValue ;

          Condition = "MINT" ; BookValue * 1.5 ;

          Condition = "P" ; BookValue * 0. ;

          Condition = "G" ; BookValue * 0.25 ;

          Condition = "F" ; BookValue * 0.15 ;

          [whatever that value C1*4 would be]

          )

          You could make your calculation more flexible for the future by maintaining a table of the multipliers, in case they changed as the market changed.

          • 2. Re: Help with If/Then formula
            RickKughen

            Thanks, Sorbsbuster! This worked perfectly! I really appreciate your help! :)

            • 3. Re: Help with If/Then formula
              philmodjunk

              And with a table of the mutlipliers, you can also eliminate the need for any If or Case function if you set up the correct relationship for this table of values--which adds even more flexibility to the design and function of your database.