+ Reply to Thread
Results 1 to 4 of 4

if command

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    singapore
    Posts
    2

    Question if command

    Totally clueless. Please help me to come up with a simple command to calculate commission payable based on the below condition

    if net gain is
    $8000-$11,999, payable at 4%
    $12,000 - $20,999, payable at 7%
    $21,000 - $29,999, payable at 10%
    >= $30,000, one off payment at $3,000

    i tried to modify some examples, but excel kept returning error

    first attempt:
    =IF(AND((N8)<=8000,(N8)<11999,4%,IF(AND((N8)>12000,(N8)<=20999),7%,IF(AND((N8)>21000,(N8)<=29999),10%,3000)))

    2nd attempt:
    =if(n8<7999,n8*0.04,if(n8<21000,n8*0.07),if(n8<30000,n8*0.10),if(n8>29000,3000))

    I've spent the whole morning and afternoon on it and my boss is getting impatient! please help!!! thank you

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Perhaps

    Please Login or Register  to view this content.
    Regards

    Dav

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    =IF(N8>=30000,3000,N8*HLOOKUP(N8,{0,8000,12000,21000;0,0.04,0.07,0.1},2))

    I assumed there's no commission for values less than 8000.

    HTH

  4. #4
    Registered User
    Join Date
    10-02-2008
    Location
    singapore
    Posts
    2
    Awww... many thanks with the fast response.
    My boss is happy now

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy & Select All command Buttons
    By slmi1313 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-22-2008, 09:32 AM
  2. Exiting a cell when clicking on a command button
    By jcl20 in forum Excel General
    Replies: 1
    Last Post: 07-06-2008, 10:32 AM
  3. Refresh workbook from command prompt
    By gucci in forum Excel General
    Replies: 1
    Last Post: 04-22-2007, 01:54 PM
  4. Removing command buttons using code
    By chalie1105 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2006, 02:25 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1