writing formula with multiple conditions

F

Felix

I am having trouble writing a formula to accomplish the
following:
I am writting a formula in cell J6 that will look to
cell D6 and based on the value in D6 (one of 12 possible
values either January - December)perform one of 12
calculations. I.E. if D6 equals Jan the value in J6 will
be divided by 12, or if the value in D6 equals Feb the
value in J6 will be divided by 11, and so on until
finally if D6 equals Dec the value in J6 will be divided
by one. I was attempting to use the following formula to
accomplish this task but ran into the limitation of seven
functions in a formula before entering all the 12
conditions:
=SUM(IF(D6="JAN",J6/12,IF(D6="FEB",J6/11,.......
COULD SOMEONE PLEASE SHOW ME HOW TO WRITE A FORMALUA TO
ACCOMPLISH THIS TASK?
THANK YOU
FELIX
 
D

Don Guillett

One way. ONE line
=d6/(13-LOOKUP(C7,{"Apr","Aug","Dec","Feb","Jan","Jul","Jun","Mar","May","no
v","oct","sep"},{4,8,12,2,1,7,6,3,5,11,10,9}))
 
D

Don Guillett

Much better than mine but a small mod to subtract
=j6/(13-MONTH(DATEVALUE("1" & D6 & "2000")))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top