Hello,

I am trying to assign a number based on the table below.  Foir
example, if the number I am testing is greater than 13%, then the
formula would provide 1.30.  If the number was -2%, then it would
assign 0.80, etc...  I tried using a custom function but can't seem to
get it to work, and a nested if formula results in too many
arguments.

> 13%       1.30
9% to 13%    1.20
5% to 9%            1.10
0 to 5%     1.00
0 to -3%            0.80
-3% to -7%    0.70
-7% to -12%  0.60
< -12%      0.50

I tried using this custom function, but something isn't working with
the sequence and the numbers aren't populating correctly:

Function FINDTier(ERNVAR, Tier As Range)
Select Case ERNVAR
        Case Is < 1, Is >= 0.13: FINDTier = Tier(1)
        Case Is < 0.13, Is > 0.09: FINDTier = Tier(2)
        Case Is < 0.09, Is > 0.05: FINDTier = Tier(3)
        Case Is < 0.05, Is > 0: FINDTier = Tier(4)
        Case Is < 0, Is > -0.03: FINDTier = Tier(5)
        Case Is < -0.03, Is > -0.07: FINDTier = Tier(6)
        Case Is < -0.07, Is > -0.12: FINDTier = Tier(7)
        Case Is < 0.12: FINDTier = Tier(8)
    End Select
End Function

I have a very basic knowledge of VBA at best.

Thanks in advance for your help.

Brian



--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 5,200 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to