Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tax Function (Excel 2000)

    I know I had this worked out at one time, but for the life of me, it's driving me nuts this morning. Could anyone take a quick look at the function below and tell me why it isn't giving me the right figures and how to adjust it for it to work correctly?

    Public Function tax(income As Single)
    Select Case income
    Case Is <= 2500
    tax = 0
    Case Is <= 5000
    tax = (5000 - 2500) * 0.05
    Case Is > 5000
    tax = (income - 5000) * 0.1 + 125
    End Select
    End Function

    Thank you,
    NMP
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tax Function (Excel 2000)

    Shouldn't it be :
    Public Function tax(income As Single)
    Select Case income
    Case Is <= 2500
    tax = 0
    Case Is <= 5000
    tax = (income - 2500) * 0.05
    Case Is > 5000
    tax = (income - 5000) * 0.1 + 125
    End Select
    End Function
    Francois

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tax Function (Excel 2000)

    Francois,

    Yes. It is a Monday after all.

    Thank you,

    NMP
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •