Function preciofinal(tramo, demanda As String)
If tramo = "Norte" And demanda = "Alta" Then
pf = 500 * (1 - 0.1)
preciofinal = pf
ElseIf tramo = "Norte" And demanda = "Media" Then
pf = 450 * (1 - 0.1)
preciofinal = pf
ElseIf tramo = "Norte" And demanda = "Baja" Then
pf = 400 * (1 - 0.1)
preciofinal = pf
ElseIf tramo = "Norte" And demanda = "Normal" Then
pf = 420 * (1 - 0.1)
preciofinal = pf
End If
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If tramo = "Centro" Or demanda = "Alta" Then
pf = 500 * (1 - 0.15)
preciofinal = pf
ElseIf tramo = "Centro" Or demanda = "Media" Then
pf = 450 * (1 - 0.15)
preciofinal = pf
ElseIf tramo = "Centro" Or demanda = "Baja" Then
pf = 400 * (1 - 0.15)
preciofinal = pf
ElseIf tramo = "Centro" Or demanda = "Normal" Then
pf = 420 * (1 - 0.15)
preciofinal = pf
End If
'-------------------------------------------------------------
If tramo = "Sur" And demanda = "Alta" Then
pf = 500 * (1 - 0.2)
preciofinal = pf
ElseIf tramo = "Sur" And demanda = "Media" Then
pf = 450 * (1 - 0.2)
preciofinal = pf
ElseIf tramo = "Sur" And demanda = "Baja" Then
pf = 400 * (1 - 0.2)
preciofinal = pf
ElseIf tramo = "Sur" And demanda = "Normal" Then
pf = 420 * (1 - 0.2)
preciofinal = pf
End If
End Function
Me comentas y valoras para finalizar saludos!!!