+ Reply to Thread
Results 1 to 5 of 5

Create formulas based on drop-down data

  1. #1
    Registered User
    Join Date
    05-26-2012
    Location
    Salisbury
    MS-Off Ver
    Excel 2010
    Posts
    2

    Create formulas based on drop-down data

    I have, what I thought, to be a simple sheet to program. I am trying to create a formula to calculate the total annual amount based on a dollar amount entered in one cell and a pay frequency selected from a drop down in the adjacent cell.

    Ex: C2 = $10
    D2 = Monthly (selected form drop-down box which contains monthly, quarterly, semi-annually, annually)
    **E2 = I want this cell to contain $120, based on this example, so I need it to be written so that C2*12 IF D2=Monthly. And so on so that the total will be $40 if C2*4 IF D2=Quarterly, $20 if C2*2 IF D2=Semi-annual, and $10 if C2*1 IF D2=Annual.


    Thanks - Matt

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Create formulas based on drop-down data

    If you build a table like this:

    Weekly 52
    Bi-Weekly 26
    Monthly 12
    Quarterly 4
    Semi-Annually 2
    Annually 1

    name the first column FreqDesc and the second FreqQty, this formula will return the number:

    =INDEX(FreqQty,MATCH(D2,FreqDesc,0))

    Where D2 has your selected interval. Then just multiply this as needed:

    =C2*Index(FreqQty, Match(D2,FreqDesc,0))

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Create formulas based on drop-down data

    Try

    =C2*LOOKUP(D2,{"Annually","Monthly","Quarterly","Semi-annually"},{1,12,4,2})

  4. #4
    Registered User
    Join Date
    05-26-2012
    Location
    Salisbury
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Create formulas based on drop-down data

    Quote Originally Posted by Cutter View Post
    Try

    =C2*LOOKUP(D2,{"Annually","Monthly","Quarterly","Semi-annually"},{1,12,4,2})
    Perfect.....Thanks!!!

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Create formulas based on drop-down data

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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