# Program

## Source

This is the MM source of your spreadsheet, listing the variables ("attributes"), and the equations relating them. Just after you have decompiled the spreadsheet, the attributes will have the same names as the cells, but you can rename them. You can also ask MM to guess their names by looking at adjacent labels.

attributes <
B27 // @ e f v
B28 // @ e f v
C6 // @ e f v
C7 // @ e f v
C8 // @ e f v
C9 // @ e f v
C10 // @ e f v
C11 // @ e f v
C15 // @ e f v
C16 // @ e f v
C17 // @ e f v
C18 // @ e f v
C19 // @ e f v
C20 // @ e f v
C21 // @ e f v
C22 // @ e f v
C23 // @ e f v
C29 // @ e f v
C30 // @ e f v
C31 // @ e f v
C32 // @ e f v
C33 // @ e f v
C34 // @ e f v
F8 // @ e f v
F10 // @ e f v
F11 // @ e f v
>
where
B28=IF((C15=1),"-> with a unitary elasticity. A 1% increase in advertising will cause a 1% increase in the quantity demanded",IF((C15>1),"-> relatively elastic. A 1% increase in advertisng causes a larger than 1% increase in the quantity demanded",IF((C15<1),"-> a relatively inelastic demand. A 1% increase in advertising causes a smaller than 1% increase in the quantity demanded","-> something is wrong ! your AED is negative, so he more you advertise your good, the lower the demand !"))) // @ a f v
B27=IF((C15>0.0),"-> change in advertising shifts demand for the good to the right","-> change in advertising shifts demand for the good to the left !") // @ a f v
C34=7 // @ a f v
C33=20 // @ a f v
C32=((F11*F10)*(C7/100))+C7 // @ a f v
C31=(F11*(C6/100))+C6 // @ a f v
C30=100 // @ a f v
F11=5 // @ a f v
F10=0.8 // @ a f v
C29=100 // @ a f v
C23=C19+-C21 // @ a f v
C22=C18+-C20 // @ a f v
C21=IF((F8="no"),C8+(C11*C9),C31+(C34*C32)) // @ a f v
C20=IF((F8="no"),C6+(C11*C7),C29+(C34*C30)) // @ a f v
C9=150 // @ a f v
C8=120 // @ a f v
C7=100 // @ a f v
C19=IF((F8="no"),(C9*C10),(C32*C33)) // @ a f v
C6=100 // @ a f v
C18=IF((F8="no"),(C10*C7),(C33*C30)) // @ a f v
C17=B28 // @ a f v
C16=B27 // @ a f v
C15=IF((F8="no"),((C6/C7)*(C9+-C7/C8+-C6)),F10) // @ a f v
F8="no" // @ a f v
C11=7 // @ a f v
C10=20 // @ a f v

## Addresses

These are the cell addresses of the attributes.

## Annotations

These are the addresses and contents of text cells that don't take part in the calculations. Just after you have decompiled the spreadsheet, there will be none of these, because MM starts by assuming all cells do take part. However, you can ask it to guess which cells are annotations.

B11 -> "Costs per Unit (excl advertising) (N#)"
B21 -> "New Costs (incl of Advertising) (N#)"
B31 -> "Final Advertising (N#) working area"
E11 -> "Change in Advertising (%)"
B10 -> "Original Price (N#)"
B20 -> "Original Costs (incl of Advertising) (N#)"
B30 -> "Initial Quantity (Q) working area"
E10 -> "AED set by user"
B9 -> "Final Quantity (Q)"
B19 -> "New Total Revenue (N#)"
B29 -> "Intital Advertising (N#) working area"
B8 -> "Final Adervtising (N#)"
B18 -> "Original Total Revenue (N#)"
E8 -> "Use these inputs ? (yes / no)"
B7 -> "Initial Quantity (Q)"
B6 -> "Intital Advertising (N#)"
B16 -> "Description"
B15 -> "AED"
B25 -> "Working Area"
B4 -> "Input"
B34 -> "Costs per Unit (working area) (N#)"
B13 -> "Output Area"
B23 -> "New Profit (N#)"
B33 -> "Original Price (N#) working area"
B2 -> "Advertising Elasticity of Demand"
B22 -> "Original Profit (N#)"
B32 -> "Final Quantity (Q) working area"

## Evaluated

This is the result of running the spreadsheet.

 A B C D E F 1 2 Advertising Elasticity of Demand 3 4 Input 5 6 Intital Advertising (N#) 100 @ a e f 7 Initial Quantity (Q) 100 @ a e f 8 Final Adervtising (N#) 120 @ a e f Use these inputs ? (yes / no) no @ a e f 9 Final Quantity (Q) 150 @ a e f 10 Original Price (N#) 20 @ a e f AED set by user 0.8 @ a e f 11 Costs per Unit (excl advertising) (N#) 7 @ a e f Change in Advertising (%) 5 @ a e f 12 13 Output Area 14 15 AED 5/2 @ a e f 16 Description -> change in advertising shifts demand for the good to the right @ a e f 17 -> relatively elastic. A 1% increase in advertisng causes a larger than 1% increase in the quantity demanded @ a e f 18 Original Total Revenue (N#) 2000 @ a e f 19 New Total Revenue (N#) 3000 @ a e f 20 Original Costs (incl of Advertising) (N#) 800 @ a e f 21 New Costs (incl of Advertising) (N#) 1170 @ a e f 22 Original Profit (N#) 1200 @ a e f 23 New Profit (N#) 1830 @ a e f 24 25 Working Area 26 27 -> change in advertising shifts demand for the good to the right @ a e f 28 -> relatively elastic. A 1% increase in advertisng causes a larger than 1% increase in the quantity demanded @ a e f 29 Intital Advertising (N#) working area 100 @ a e f 30 Initial Quantity (Q) working area 100 @ a e f 31 Final Advertising (N#) working area 105 @ a e f 32 Final Quantity (Q) working area 104.0 @ a e f 33 Original Price (N#) working area 20 @ a e f 34 Costs per Unit (working area) (N#) 7 @ a e f

## Formulae

This is the spreadsheet in formula view.

 A B C D E F 1 2 Advertising Elasticity of Demand 3 4 Input 5 6 Intital Advertising (N#) 100 @ a e v 7 Initial Quantity (Q) 100 @ a e v 8 Final Adervtising (N#) 120 @ a e v Use these inputs ? (yes / no) "no" @ a e v 9 Final Quantity (Q) 150 @ a e v 10 Original Price (N#) 20 @ a e v AED set by user 0.8 @ a e v 11 Costs per Unit (excl advertising) (N#) 7 @ a e v Change in Advertising (%) 5 @ a e v 12 13 Output Area 14 15 AED IF((F8="no"),((C6/C7)*(C9+-C7/C8+-C6)),F10) @ a e v 16 Description B27 @ a e v 17 B28 @ a e v 18 Original Total Revenue (N#) IF((F8="no"),(C10*C7),(C33*C30)) @ a e v 19 New Total Revenue (N#) IF((F8="no"),(C9*C10),(C32*C33)) @ a e v 20 Original Costs (incl of Advertising) (N#) IF((F8="no"),C6+(C11*C7),C29+(C34*C30)) @ a e v 21 New Costs (incl of Advertising) (N#) IF((F8="no"),C8+(C11*C9),C31+(C34*C32)) @ a e v 22 Original Profit (N#) C18+-C20 @ a e v 23 New Profit (N#) C19+-C21 @ a e v 24 25 Working Area 26 27 IF((C15>0.0),"-> change in advertising shifts demand for the good to the right","-> change in advertising shifts demand for the good to the left !") @ a e v 28 IF((C15=1),"-> with a unitary elasticity. A 1% increase in advertising will cause a 1% increase in the quantity demanded",IF((C15>1),"-> relatively elastic. A 1% increase in advertisng causes a larger than 1% increase in the quantity demanded",IF((C15<1),"-> a relatively inelastic demand. A 1% increase in advertising causes a smaller than 1% increase in the quantity demanded","-> something is wrong ! your AED is negative, so he more you advertise your good, the lower the demand !"))) @ a e v 29 Intital Advertising (N#) working area 100 @ a e v 30 Initial Quantity (Q) working area 100 @ a e v 31 Final Advertising (N#) working area (F11*(C6/100))+C6 @ a e v 32 Final Quantity (Q) working area ((F11*F10)*(C7/100))+C7 @ a e v 33 Original Price (N#) working area 20 @ a e v 34 Costs per Unit (working area) (N#) 7 @ a e v
#!void