Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Macros Basicos

35,498 views

Published on

Esta presentacion es un tutorial para hacer macros (basicos) y entender la estructura de visual basic para aplicaciones

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Macros Basicos

  1. 1. Excel: Macros Básicos Visual Basic para aplicaciones Estrictamente necesario entender ingles By Renee Mangino 2008
  2. 2. Objetivos de la sesion: <ul><li>Saber que en Excel se pueden realizar : </li></ul><ul><li>Procedimientos: pasos repetidos y automáticos </li></ul><ul><li>Manejo de Objetos: un ítem que puedes controlar con visual (botones) </li></ul><ul><li>Funciones: Hacer calculaciones y devolver un valor x (* si hay tiempo) </li></ul>Publico: <ul><li>Personas que no tienen conocimientos de programación, pero tienen la necesidad o curiosidad de mejorar su trabajo: </li></ul><ul><li>Hacerlo mas rápido </li></ul><ul><li>Evitar errores de entradas manuales </li></ul><ul><li>Maximizar el uso de Excel </li></ul>
  3. 3. ¿Donde está el Menu de Macros?
  4. 4. ¿ Barra de Herramientas ?
  5. 5. ¿Por que Visual Basic? <ul><li>Visual Basic es el lenguaje en el que se apoya Excel para hacer procedimientos por medio de programación. </li></ul><ul><li>Cuando surge una duda pon en </li></ul><ul><li>&quot;Duda&quot; visual basic para buscar códigos que te sirvan </li></ul>
  6. 6. Grabar un Macro Record Macro: Asigna un nombre y un procedimiento, pon &quot;stop&quot; Puedes asignar un &quot;shortcut&quot; Puedes editar las líneas de la grabación Ejercicio: GRABA un Macro que ejecute lo siguiente: &quot;Miprimermacro&quot; Cambia el nombre a la hoja por &quot;Prueba&quot; Pon tu nombre completo en la Celda &quot;B2&quot; Pon los años que tienes en la celda &quot;B3&quot; Haz un &quot;Scroll down&quot; (Muévete en la hoja con las barritas) En la celda &quot;B4&quot; pon una formula que calcule el numero de días vividos En la celda &quot;C5&quot; coloca la leyenda &quot;Días vividos&quot; STOP
  7. 7. Correr un Macro <ul><li>Pasos para correr </li></ul><ul><li>Selecciona todo lo que escribiste en la hoja </li></ul><ul><li>Bórralo </li></ul><ul><li>En el menú de macros, pon &quot;play&quot; </li></ul><ul><li>Revisa que ejecute lo mismo que hicimos en el ejercido anterior </li></ul>Agrega Shortcuts (atajos de teclado)
  8. 8. Veamos ¿Que hicimos? <ul><li>La carpeta de modulo solo aparece ya que se grabó un macro, si no hay macros grabados no aparece </li></ul><ul><li>Abre la barra de herramientas de EDIT en Visual Basic </li></ul><ul><li>Las letras en verde no son parte de la programación, son comentarios y empiezan con un apostrofe ' o REM (juega con estos dos iconos: ) </li></ul>
  9. 9. Lenguaje visual: <ul><li>Empezemos a hablar en Visual Basic </li></ul><ul><li>Visual Basic Coloquial </li></ul><ul><li>Sub Nombre() </li></ul><ul><li>End Sub </li></ul>Mellamo Nombre() Acabé Todas las instrucciones Visual Basic es mejor decirles que empiezen Y que acaben SIEMPRE Activar y desactivar
  10. 10. Codigo: &quot;Miprimermacro&quot; Que . Como (Accion o propiedad) Range(&quot;B2&quot;).Select Referencia Absoluta Activecell.Select Referencia Relativa El texto siempre va entre comillas Para no ser confunido con Texto
  11. 11. Propiedades: <ul><li>Propiedades: </li></ul><ul><li>Cambian valores, formatos, ubican, etc, </li></ul><ul><li>Select: Referencia de ubicación </li></ul><ul><li>Value: = &quot;Texto&quot; o = valor </li></ul><ul><li>Offset: Desfase (Row,Column) </li></ul>Absolutas Range(&quot;A2&quot;).Select Range(&quot;A2&quot;).Value = 5 Range(&quot;A3&quot;).Select Relativas ActiveCell.select ActiveCell.Value = 5 Activecell.Offset(1,0).Select
  12. 12. Propiedades: <ul><li>Ejercico: </li></ul><ul><li>GRABA un macro de nombre formatos </li></ul><ul><li>Escribe en 3 celdas diferentes 3 nombres de superheroes </li></ul><ul><li>Rellena una celda de color </li></ul><ul><li>Cambia el color del texto a otra </li></ul><ul><li>Agrega bordes a la tercera </li></ul><ul><li>Selecciona las 3 celdas y centra el texto </li></ul><ul><li>STOP </li></ul>Sub superheroe() '' Range(&quot;J4&quot;).Select ActiveCell.FormulaR1C1 = &quot;Superman&quot; Range(&quot;J5&quot;).Select ActiveCell.FormulaR1C1 = &quot;La mujer maravilla&quot; Range(&quot;J6&quot;).Select ActiveCell.FormulaR1C1 = &quot;Afroman&quot; Range(&quot;J4&quot;).Select With Selection.Interior .ColorIndex = 39 .Pattern = xlSolid End With Range(&quot;J5&quot;).Select Selection.Font.ColorIndex = 5 Range(&quot;J6&quot;).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With ..... Range(&quot;J4:J6&quot;).Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 . AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Revisa Lo que es necesario en la macro Lo que da valor al macro &quot;Quita la paja&quot; paja
  13. 13. Revision de Codigo: <ul><li>Sub superheroe() </li></ul><ul><li>' Escribe 3 superheroes </li></ul><ul><li>Range(&quot;J4&quot;).Select </li></ul><ul><li>ActiveCell.FormulaR1C1 = &quot;Superman&quot; </li></ul><ul><li>Range(&quot;J5&quot;).Select </li></ul><ul><li>ActiveCell.FormulaR1C1 = &quot;La mujer maravilla&quot; </li></ul><ul><li>Range(&quot;J6&quot;).Select </li></ul><ul><li>ActiveCell.FormulaR1C1 = &quot;Afroman&quot; </li></ul><ul><li>Rem Pone color solido a una celda </li></ul><ul><li>Range(&quot;J4&quot;).Select </li></ul><ul><li>With Selection.Interior </li></ul><ul><li>.ColorIndex = 39 </li></ul><ul><li>.Pattern = xlSolid </li></ul><ul><li>End With </li></ul><ul><li>Rem Cambia color de celda </li></ul><ul><li>Range(&quot;J5&quot;).Select </li></ul><ul><li>Selection.Font.ColorIndex = 5 </li></ul><ul><li>Rem Agrega bordes (Los bordes usan muchas lineas de codigo x que son 4 lineas 'en un rectangulo mas dos lineas interiores) </li></ul>Range(&quot;J6&quot;).Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin End With ' Centra los textos de la seleccion de J4 a J6 Range(&quot;J4:J6&quot;).Select With Selection .HorizontalAlignment = xlCenter End With End Sub
  14. 14. Revision de Codigo: Correr completo: F5 Correr completo: F5 Loop infinito: Esc (una sola vez, basta)
  15. 15. Resumen: <ul><li>Hasta ahora ya aprendí: </li></ul><ul><li>Grabar macros, correr macros y editar macros </li></ul><ul><li>Identificar donde acaba y donde empieza una macro </li></ul><ul><li>Ordenar la macro con comentarios para recordar que está haciendo </li></ul><ul><li>Leer codigo de Visual Basic </li></ul><ul><li>Manejar coordenada absolutas y relativas </li></ul><ul><li>Saber que es importante y que puedo borrar </li></ul>
  16. 16. Cuadros de dialogo: Dim x as integer __________________________________________ Sub box() X = InputBox(&quot;¿Cuantos escalones hay en tu casa?&quot;) Range(&quot;J8&quot;).Value = X Range(&quot;J8&quot;).Select End Sub Para pedir información al usuario como números o Texto y guardar esa información (variable) Se requiere declarar variable Dim x as integer Inputbox MsgBox &quot;Tu mensaje&quot;, (boton+simbolo) MsgBox &quot;Botones OK y Cancel&quot;, 1 Msgbox &quot;Tu mensaje&quot;, 4+32 Para dar un aviso: Puedes tener OK, Abort, Yes & No, etc Msgbox Ejemplo Uso Comando
  17. 17. Comandos Logicos: IF Sub Macro6() ' Condicion con dos alternativas If ActiveCell.Value < 0 Then MsgBox &quot;Tu mensaje&quot; Else Msgbox &quot;Tu mensaje altenativo&quot; End If End Sub Condicion con dos alternativas: si la condicion es verdadera se ejecuta un procedimiento, si es falsa se ejecuta otro procedimiento If condition Then statement Else No disponible para este curso Ejecuta mas alternativas Cada vez que se llega a un &quot;Elseif&quot; se vuelve a evaluar la condicion IF condition Then statement ElseIF condition Then statement End if Sub Macro5() ' Condicion con una alternativa If ActiveCell.Value < 0 Then MsgBox &quot;Tu mensaje&quot; End If End Sub Condicion con una alternativa , Si la condicion no es verdadera, no pasa nada If condition Then Statement Ejemplo Uso Comando
  18. 18. Ejercicio: <ul><li>Quiero hacer un Gaffette para una expo de accesorios para automoviles: Si el participante es propietario de dos o mas coches, es mas probable que compre mis productos: </li></ul><ul><li>Haz un Macro que funcione para hacer estas </li></ul><ul><li>Dos variantes de gaffette : Tu escoge los colores </li></ul><ul><li>(6 columnas x 8 renglones) empieza en C3 y usa referencia absolutas </li></ul>
  19. 19. Comandos Logicos: Do...Loop Sub colores() ´hace la instruccion desde el inicio y hasta que la condicion se cumpla Do Until counter = 50 counter = counter + 1 ActiveCell.Select ActiveCell.Value = counter ActiveCell.Select Selection.Interior.ColorIndex = counter ActiveCell.Offset(1, 0).Select Loop End Sub Sirve para repetir el procedimiento muchas veces hasta que aparezca una condicion que nos hara parar el ciclo de repeticiones Dim counter as integer Do Until Loop (Si es Falso , ejectuto) Ejemplo Uso Comando
  20. 20. Comandos Logicos: Do...Loop Sub Ahora() ´ hace la instruccion hasta que se cambie de estado Range(&quot;a2&quot;).Select Do While ActiveCell.Value > 0 ActiveCell.Offset(0, 1).Select If ActiveCell.Value = &quot;&quot; Then ActiveCell.Value = Date + Time ActiveCell.Offset(1, -1).Select Else ActiveCell.Offset(1, -1).Select End If Loop End Sub Sirve para repetirse mientras las condiciones se cumplan Do While Loop (Si es verdadero, ejecuto) Ejemplo Uso Comando
  21. 21. Cuando corro un Macro: Boton ¿Como hago para que al presionar un Boton (imagen) se corra un Macro?
  22. 22. Al abrir o cerrar el libro: automaticos <ul><li>Auto_Open () o Auto_Close() son procedimientos que se ejecutan al abrir o cerrar el libro. </li></ul><ul><li>Sub Auto_Open() Sub Auto_Close() </li></ul><ul><li>Statements Statements </li></ul><ul><li>End Sub End Sub </li></ul>¿Porque sería bueno correr los macros al abrir o al cerrar el libro?
  23. 23. Ejercicio: <ul><li>Haz un macro que al abrirlo te de la bienvenida </li></ul><ul><li>Y al cerrarlo se despida de ti. (usa msgbox) </li></ul>Hola!!!! Adios!!!!
  24. 24. Practicas ¿Que reportes hago?
  25. 25. Ejercicio: Sheets <ul><li>Haz una base de datos de gastos: </li></ul>
  26. 26. Sheets <ul><li>GRABA un macro que haga una tabla dinamica con Mes en Renglones, Concepto en columnas y Tarjeta como campo de pagina. STOP </li></ul>
  27. 27. Sheets <ul><li>GRABA un Macro que cambie el nombre a la </li></ul><ul><li>Hoja de la tabla pivote por &quot;Pivote&quot; </li></ul><ul><li>Stop </li></ul><ul><li>Graba un macro que copie los valores de la tabla pivote y los pegue en el renglon &quot;A100&quot; pero como valor </li></ul><ul><li>Stop </li></ul>
  28. 28. Sheets <ul><li>Graba un macro que grafique los gastos como columnas moradas </li></ul><ul><li>STOP </li></ul><ul><li>*Haz una Macro &quot;General&quot; que llame a todas las macros que grabaste </li></ul><ul><li>Graba un macro que al cerrarse el libro borre la </li></ul><ul><li>Hoja llamada Pivote </li></ul><ul><li>STOP </li></ul>
  29. 29. Explication: <ul><li>Aplicaciones para hojas: </li></ul><ul><li>Absolutas : </li></ul><ul><li>Sheets(&quot;Sheet4&quot;).Select </li></ul><ul><li>Sheets(&quot;Sheet4&quot;).Name = &quot;Pivote&quot; </li></ul><ul><li>Relativas : </li></ul><ul><li>ActiveSheet.Select </li></ul><ul><li>ActiveSheet.Name = &quot;Pivote2&quot; </li></ul>
  30. 30. Funciones <ul><li>Son &quot;Formulas&quot; que con argumentos devuelven un valor. </li></ul><ul><li>Hacen trasformaciones de datos a partir de bases lógicas </li></ul><ul><li>Se llaman por medio de un macro </li></ul><ul><li>Function Name(argument) </li></ul><ul><li>Statments </li></ul><ul><li>End function </li></ul>Function CelciusConversion(F) Celsiusconversion = (5 / 9) * (F - 32) End Function Sub Fahrenheit_Celsius() F = ActiveCell.Value ActiveCell.Offset(0, 3) = Celsiusconversion(F) End Sub
  31. 31. Llamar a la función: Ahora apaece en el menu de f(x) funcion Aparece como formula

×