New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Drop down menu that subtracts according to the selection

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

Drop down menu that subtracts according to the selection

Postby bl_estefy88 » Fri Jan 22, 2016 6:56 pm

Hi!
I have created a spreadsheet at work (unfortunately cannot attach the file for security) to calculate show the type and amount of leave a person has left.
I have the total amount of annual leave days allocated in B1 (Example: 23), and on B2 the number of days the person is taking (example: 3), and the amount of days left on B3 (20). So far it is very easy.
I have created a drop down menu to select the type of leave (annual leave, sick leave, compassionate leave, etc) and I would like the value in B3 to be the result of the subtraction only if annual leave is selected from the drop down menu. At the moment it looks like all the types of leave would affect the person's allocation but it shouldn't be that way and I cannot find the function to reflect this.
If you can help that would be great!! Thanks and hope the description is clear.
  • 0

bl_estefy88
Rookie
 
Posts: 2
Joined: Jan 22, 2016
Reputation: 0
Excel Version: Windows 7

Re: Drop down menu that subtracts according to the selection

Postby Beamer » Sat Jan 23, 2016 12:31 am

If the drop=down is in A1 and the list says Annual, then in B3:

Code: Select all
=IF(A1="Annual",B1-B2,B1)
  • 0

Beamer
Excel Junkie
 
Posts: 217
Joined: Oct 3, 2014
Location: New South Wales, Australia
Reputation: 31
Excel Version: 2010

Re: Drop down menu that subtracts according to the selection

Postby bl_estefy88 » Sun Jan 31, 2016 4:33 pm

Thank you so much for your help!!
  • 0

bl_estefy88
Rookie
 
Posts: 2
Joined: Jan 22, 2016
Reputation: 0
Excel Version: Windows 7


Return to General Excel Questions

Who is online

Users browsing this forum: Google [Bot] and 123 guests