# How would I write this formula?

#### Mainbeam

##### New member
With the reference number in cell G2 how would I write this? I keep getting errors. I get this far: IF(G2>=75,6,IF(G2?

>= 75% add 6
45-54.9% none
35-44.9%. subtract 1
25-34.9%. subtract 3
Less then 25% subtract 6

Any help would be greatly appreciated! Thanks

#### Ken Puls

Staff member
Skip the IF function and use VLOOKUP. Example attached.

#### Attachments

• xlgf494-1.xls
28 KB · Views: 18

##### New member
Soln

Or if IF Condition is all you want to use, then u'd have to use this formula

This is assuming the Value that you want to use is in Cell A1, also you have to format the cell to %

=IF(A1="","",IF(A1<25%,-6,IF(A1<35%,-3,IF(A1<45%,-1,IF(A1<55%,0,IF(A1<65%,1,IF(A1>=75%,6)))))))

#### Canapone

##### New member
Hi,

in B2 the percentage

Code:
``=vlookup(B2,{0,-6\0.25,-3\0.35,-1\0.45,0\0.55,1\0,65,3\0.75,6},2,1)``

Please refer to the small example attached: not sure to have translated correctly from my "not English/U.S." settings.

Regards

#### Attachments

• eg.xls
13.5 KB · Views: 14
Last edited: