[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 • Ayuda con excel
Página 1 de 1

Ayuda con excel

Publicado: Dom Oct 02, 2011 3:50 pm
por pong
Buenos dias a todos. Necesito ayuda con un excel. A ver quien me puede ayudar...

Estoy realizando un excel que me pasa dentro de un libro, de hoja en hoja tomando los datos que necesito para insertarlos en otra hoja.
Mi problema es que las hojas del libro van cambiando de nombre. He intentado lo siguiente:

a= CELLS(1,2) "en esta celda escribo el nombre de la hoja en cuestion numero 1"
b= CELLS(1,3) "en esta celda escribo el nombre de la hoja en cuestion numero 2"
c= CELLS(1,4) "en esta celda escribo el nombre de la hoja en cuestion numero 3"
d= CELLS(1,5) "en esta celda escribo el nombre de la hoja en cuestion numero 4"

Y luego poner:
Sheets(a).select "y que me seleciones la hoja con nombre 1 y hacer lo que quiero , y luego sheets(b).select y que me seleccione la de nombre 2....." Pero esto me da error.

Espero que con esto hayais entendido lo que quiero hacer.
GRACIAS!

Re: Ayuda con excel

Publicado: Vie Nov 18, 2011 9:42 pm
por juaco1
Hola!... prueba agregando en el código el tipo de variable que es a... por ejemplo

Dim a as String

Entonces así lo defines como "letras"

a mi me funcionó de esta manera:

Sub seleccionarHoja()
Dim a As String
a = Worksheets("Hoja1").Cells(3, 3)
Worksheets("Hoja1").Cells(2, 2) = a
Sheets(a).Select
End Sub

espero que te ayude!
Saludos!