Forum Discussion

JSIMONBOL's avatar
JSIMONBOL
Copper Contributor
Mar 07, 2024
Solved

IF Then Help

I want to create a score system where if I INPUT 2 then the adjustment is -1, if its 4 then its -2, if its 6, then it's -3 and so forth. Same goes for odd number where 3 is -1, 5 is -2, and 7 is -3.  

 

So in the cell below, if i type in the number 2 it should show in the adj column as a -1. 

 

RESULT

OpenO/H
HolesAdj.
2-1
  
  
  
  

 

REFERENCE

NumberDeduction
10
2-1
3-1
4-2
5-2
6-3
7-3
8-4
9-4
10-5

12 Replies

  • djclements's avatar
    djclements
    Silver Contributor

    JSIMONBOL No need for IF here... the INT function should do the trick:

     

    =-INT(A3/2)

     

    Results

    • JSIMONBOL's avatar
      JSIMONBOL
      Copper Contributor

      djclements I'd like to add one more layer. For every 4 points negative in difference your quota goes down by 1. For every (4 points) positive, your quota goes up by 2. If under 4 on either side, points remain the same. Depicted below.

       

      QuotaGrossNet DifferenceQuota Next Week
      4030-1038
      40501042
      4043340
      • djclements's avatar
        djclements
        Silver Contributor

        JSIMONBOL I think there's a typo in either your explanation or the sample results. Did you mean to say, "For every 4 points positive, your quota goes up by 1"? The sample results seem to indicate you want the same increment of 1 and -1 for every 4 points positive and negative. If so, the TRUNC function is better suited here, because INT doesn't work the same for negative numbers as it does for positive:

         

        =A2+TRUNC(C2/4)

         

        Results