+ Reply to Thread
Results 1 to 4 of 4

Change number format in one cell based on drop selection of currency or percentage

  1. #1
    Registered User
    Join Date
    12-12-2010
    Location
    Northport, AL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Change number format in one cell based on drop selection of currency or percentage

    I have a worksheet for our employees to figure 401(k) contributions and matches that's unique to our company. In my worksheet I included a drop down menu that allows then to figure the effect of their contribution as a percentage of salary or as a flat dollar amount. They choose from the drop down option and depending on their choosing a percentage or flat dollar amount they enter it in an empty cell below. Is there a way to have the number format change to either currency (for the flat dollar amount) or percentage based on what they chose from the drop down?

    Everything I see in conditional formatting relates to changing the cells color. I have tried to figure out a way of using an if statement to do this, but cannot figure that out.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Change number format in one cell based on drop selection of currency or percentage

    hi morrisg, welcome to the forum. there is a Number tab in the Conditional Formatting window after you click "Format". select the range you want to apply to (for eg. D2)
    and assuming the drop down is in B2, go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    =$B$2="$"
    go to Format -> Number -> Currency-> OK

    do the same for percentage.
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    12-12-2010
    Location
    Northport, AL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Change number format in one cell based on drop selection of currency or percentage

    Thanks so much benishiryo you already put me miles ahead! However, after following your instructions (at least I think I did) The dollar displays as cents i.e. if I enter 56 instead of $56.00 it gives me $0.56. I have attached my spreadsheet. Can you help? 401(k) Calculator v2.xlsx

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Change number format in one cell based on drop selection of currency or percentage

    ok, i realised this is not feasible, because 1 is actually 100%. do you just need the presentation of showing a percentage? if so, your conditional formatting for percentage can be Custom -> #"%"

    if you need calculations based on that cell, then do an IF like:
    =IF(B3="Percentage",B4/100*something,B4*something)
    the "something" is of course to be replaced by what you need to multiply

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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