[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 282: Undefined array key "app_rebranding_id"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 283: Undefined array key "app_url_scheme"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 284: Undefined array key "app_icon_url"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 285: Undefined array key "app_name"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 287: Undefined array key "app_alert_message"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 289: Undefined array key "app_android_id"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 290: Undefined array key "app_android_description"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 291: Undefined array key "app_banner_message_android"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 294: Undefined array key "app_ios_id"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 295: Undefined array key "app_ios_description"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/tapatalk/tapatalk/event/main_listener.php on line 296: Undefined array key "app_banner_message_ios"
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3035)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3035)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3035)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3035)
Foros Ingeniería Civil • Programando en Excel
Página 1 de 1

Programando en Excel

Publicado: Mié Dic 16, 2009 7:36 am
por MICHEL_77
Hola Otra vez,

Me piden programar en excel una función (con Function) llamada miPER que calcule el PER de una empresa, dado su precio y beneficio (PER=precio/beneficio).

Gracias otra vez por las ayudas.

Un saludo.

Re: Programando en Excel

Publicado: Mié Dic 16, 2009 8:10 am
por nassiul
Hola,

Lo pides es muy sencillo, ahora bien a la hora de llamar a la función per, le tienes que "mandar" el precio y el beneficio o la función coge las celdas .... ves por donde voy=

Especifica un poco.

saludos.

Re: Programando en Excel

Publicado: Mié Dic 16, 2009 8:42 am
por MICHEL_77
Gracias por la ayuda, intentare encaminarme ya que no tengo mucha idea por ahora.

Saludos.

Re: Programando en Excel

Publicado: Mié Dic 16, 2009 2:21 pm
por nassiul
Bien,

tienes que añadir un modulo e insertar una función.... lo mas facil es grabar una macro, y ver que es lo que hacer para entender como funcionan, si la defines como public, la puedes llamar desde cualquier sitio de excel. Seria algo como lo siguiente:

Public function miPER () as single

precio =sheets("aqui el nombre de la hoja donde se encuentre el precio").range("A1").value (se supone que precio esta en la celda A1, dentro de la hoja)
beneficio =sheets("aqui el nombre de la hoja donde se encuentre el precio").range("A2").value (se supone que precio esta en la celda A2, dentro de la hoja)

miPER=precio/beneficio '(esto hace que el valor sea devuelto en la función

end function

de todas formas te recomiendo este post que tiene un manual muy bueno.

http://foros.construaprende.com/manual- ... t7060.html

Saludos y suerte

Re: Programando en Excel

Publicado: Mié Dic 16, 2009 4:06 pm
por MICHEL_77
Muchas Gracias por la ayuda, me ha sido de mucha utilidad.

Un saludo a todos.