Compile Decompile Upload

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 <
  B21 // @ e f v
  B22 // @ e f v
  C6 // @ e f v
  C7 // @ e f v
  C8 // @ e f v
  C9 // @ e f v
  C13 // @ e f v
  C14 // @ e f v
  C15 // @ e f v
  C16 // @ e f v
  C17 // @ e f v
  C23 // @ e f v
  C24 // @ e f v
  C25 // @ e f v
  C26 // @ e f v
  C27 // @ e f v
  F6 // @ e f v
  F8 // @ e f v
  F9 // @ e f v
>
where
  B22=IF((C23=1),"-> with a unitary elasticity",IF((C13>1),"-> with a relatively elastic demand curve.","-> with a relatively inelastic demand curve.")) // @ a f v
  B21=IF((C13<0.0),"-> normal good - downward sloping demand curve","-> non-normal good (i.e.giffen good) - upward sloping demand curve") // @ a f v
  C27=C24+((F8*F9)*(C24/100)) // @ a f v
  C26=C25+((C25/100)*F9) // @ a f v
  C25=100 // @ a f v
  C24=50 // @ a f v
  C23=IF((F6="no"),ABS(C13),ABS(F8)) // @ a f v
  C9=95 // @ a f v
  C8=105 // @ a f v
  C7=100 // @ a f v
  C6=100 // @ a f v
  C17=IF((F6="no"),(C8*C9),(C26*C27)) // @ a f v
  C16=IF((F6="no"),(C7*C6),(C24*C25)) // @ a f v
  C15=B22 // @ a f v
  F9=10 // @ a f v
  C14=B21 // @ a f v
  F8=-2 // @ a f v
  C13=IF((F6="yes"),F8,((C6/C7)*(C9+-C7/C8+-C6))) // @ a f v
  F6="no" // @ a f v

Addresses

These are the cell addresses of the attributes.

B21 -> B21 a e f v
C9 -> C9 a e f v
F9 -> F9 a e f v
C8 -> C8 a e f v
F8 -> F8 a e f v
C7 -> C7 a e f v
C17 -> C17 a e f v
C27 -> C27 a e f v
C6 -> C6 a e f v
C16 -> C16 a e f v
C26 -> C26 a e f v
F6 -> F6 a e f v
C15 -> C15 a e f v
C25 -> C25 a e f v
C14 -> C14 a e f v
C24 -> C24 a e f v
C13 -> C13 a e f v
C23 -> C23 a e f v
B22 -> B22 a e f v

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 -> "Output Area - Calculate and Apply PED"
B9 -> "Final Quantity (Q)"
B19 -> "Working Area"
E9 -> "Change in Price (%)"
B8 -> "Final Price (N#)"
E8 -> "PED user input"
B7 -> "Initial Quantity (Q)"
B17 -> "New Total Revenue (N#)"
B27 -> "PED set option - new quantity ="
B6 -> "Initial Price (N#)"
B16 -> "Original Total Revenue (N#)"
B26 -> "PED set option - new price ="
E6 -> "This version ? (yes / no)"
B25 -> "PED set option - original price ="
B4 -> "Input"
B14 -> "Description"
B24 -> "PED set option - original quantity ="
B13 -> "PED"
B23 -> "absolute value of PED"
B2 -> "Price Elasticity of Demand"

Evaluated

This is the result of running the spreadsheet.

 ABCDEF
1      
2 Price Elasticity of Demand    
3      
4 Input    
5      
6 Initial Price (N#)100
@ a e f
 This version ? (yes / no)no
@ a e f
7 Initial Quantity (Q)100
@ a e f
   
8 Final Price (N#)105
@ a e f
 PED user input-2
@ a e f
9 Final Quantity (Q)95
@ a e f
 Change in Price (%)10
@ a e f
10      
11 Output Area - Calculate and Apply PED    
12      
13 PED-1
@ a e f
   
14 Description-> normal good - downward sloping demand curve
@ a e f
   
15  -> with a unitary elasticity
@ a e f
   
16 Original Total Revenue (N#)10000
@ a e f
   
17 New Total Revenue (N#)9975
@ a e f
   
18      
19 Working Area    
20      
21 -> normal good - downward sloping demand curve
@ a e f
    
22 -> with a unitary elasticity
@ a e f
    
23 absolute value of PED1
@ a e f
   
24 PED set option - original quantity =50
@ a e f
   
25 PED set option - original price =100
@ a e f
   
26 PED set option - new price =110
@ a e f
   
27 PED set option - new quantity =40
@ a e f
   

Formulae

This is the spreadsheet in formula view.

 ABCDEF
1      
2 Price Elasticity of Demand    
3      
4 Input    
5      
6 Initial Price (N#)100
@ a e v
 This version ? (yes / no)"no"
@ a e v
7 Initial Quantity (Q)100
@ a e v
   
8 Final Price (N#)105
@ a e v
 PED user input-2
@ a e v
9 Final Quantity (Q)95
@ a e v
 Change in Price (%)10
@ a e v
10      
11 Output Area - Calculate and Apply PED    
12      
13 PEDIF((F6="yes"),F8,((C6/C7)*(C9+-C7/C8+-C6)))
@ a e v
   
14 DescriptionB21
@ a e v
   
15  B22
@ a e v
   
16 Original Total Revenue (N#)IF((F6="no"),(C7*C6),(C24*C25))
@ a e v
   
17 New Total Revenue (N#)IF((F6="no"),(C8*C9),(C26*C27))
@ a e v
   
18      
19 Working Area    
20      
21 IF((C13<0.0),"-> normal good - downward sloping demand curve","-> non-normal good (i.e.giffen good) - upward sloping demand curve")
@ a e v
    
22 IF((C23=1),"-> with a unitary elasticity",IF((C13>1),"-> with a relatively elastic demand curve.","-> with a relatively inelastic demand curve."))
@ a e v
    
23 absolute value of PEDIF((F6="no"),ABS(C13),ABS(F8))
@ a e v
   
24 PED set option - original quantity =50
@ a e v
   
25 PED set option - original price =100
@ a e v
   
26 PED set option - new price =C25+((C25/100)*F9)
@ a e v
   
27 PED set option - new quantity =C24+((F8*F9)*(C24/100))
@ a e v
   
Compile Decompile Upload
#!void