SlideShare a Scribd company logo
1 of 1
Download to read offline
Curso de Visual Excel
Soluciones a las Prácticas
Enrique Manuel Cabello Portero
Práctica nº 2
Option Explicit
Sub insertarcolumna()
Columns("E:E").Select
Selection.Insert Shift:=xlToRight
Range("E1").Select
Columns("E:E").ColumnWidth = 6
End Sub
Sub formatear()
Range("A1:G1").Select
With Selection
.Interior.ColorIndex = 3
.Font.ColorIndex = 33
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
End With
End Sub
Sub borrarformato()
Range("A1:G1").Select
Selection.ClearFormats
End Sub
Sub practicados()
Dim fila As Byte
Dim beneficio, subtotal As Integer
Cells(2, 5).Select
For fila = 2 To 7
subtotal = Cells(fila, 2) * Cells(fila, 4)
Cells(fila, 5) = subtotal
Cells(fila, 6) = subtotal * 0.16
Cells(fila, 7) = subtotal * 1.16
beneficio = (Cells(fila, 4) - Cells(fila, 3)) * Cells(fila, 2)
Cells(fila, 8) = beneficio
Next fila
End Sub

More Related Content

What's hot

C# excel set excel number style
C# excel   set excel number styleC# excel   set excel number style
C# excel set excel number styleChen Stephen
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONvikram mahendra
 
Lesson5 creating simple formula
Lesson5 creating simple formulaLesson5 creating simple formula
Lesson5 creating simple formulaguevarra_2000
 
Calculating a correlation coefficient and scatter plot using excel
Calculating a correlation coefficient and scatter plot using excelCalculating a correlation coefficient and scatter plot using excel
Calculating a correlation coefficient and scatter plot using excelSandra Nicks
 
1.4 first class-functions
1.4 first class-functions1.4 first class-functions
1.4 first class-functionsfuturespective
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C BUBT
 
Statistics how to draw a simple random sample using excel sk1
Statistics   how to draw a simple random sample using excel sk1Statistics   how to draw a simple random sample using excel sk1
Statistics how to draw a simple random sample using excel sk1S.c. Chopra
 
Making an xy scatter plot
Making an xy scatter plotMaking an xy scatter plot
Making an xy scatter plotilanasaxe
 
4 1 functions
4 1 functions4 1 functions
4 1 functionshisema01
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manualkamesh dagia
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked ListSayantan Sur
 
Excel macro to generate prime numbers
Excel macro to generate prime numbersExcel macro to generate prime numbers
Excel macro to generate prime numbersUpendra Lele
 
Dervy bis-155-week-3-quiz-new
Dervy bis-155-week-3-quiz-newDervy bis-155-week-3-quiz-new
Dervy bis-155-week-3-quiz-newgovendaagoovenda
 

What's hot (20)

SQL MCQ
SQL MCQSQL MCQ
SQL MCQ
 
C# excel set excel number style
C# excel   set excel number styleC# excel   set excel number style
C# excel set excel number style
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
 
Assign 1 commands
Assign 1 commandsAssign 1 commands
Assign 1 commands
 
Exception Example in Python
Exception Example in PythonException Example in Python
Exception Example in Python
 
Bar graph
Bar graphBar graph
Bar graph
 
Lesson5 creating simple formula
Lesson5 creating simple formulaLesson5 creating simple formula
Lesson5 creating simple formula
 
Excel formulas
Excel formulasExcel formulas
Excel formulas
 
Calculating a correlation coefficient and scatter plot using excel
Calculating a correlation coefficient and scatter plot using excelCalculating a correlation coefficient and scatter plot using excel
Calculating a correlation coefficient and scatter plot using excel
 
1.4 first class-functions
1.4 first class-functions1.4 first class-functions
1.4 first class-functions
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
 
Statistics how to draw a simple random sample using excel sk1
Statistics   how to draw a simple random sample using excel sk1Statistics   how to draw a simple random sample using excel sk1
Statistics how to draw a simple random sample using excel sk1
 
Making an xy scatter plot
Making an xy scatter plotMaking an xy scatter plot
Making an xy scatter plot
 
4 1 functions
4 1 functions4 1 functions
4 1 functions
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
week-15x
week-15xweek-15x
week-15x
 
Applications of stack
Applications of stackApplications of stack
Applications of stack
 
Excel macro to generate prime numbers
Excel macro to generate prime numbersExcel macro to generate prime numbers
Excel macro to generate prime numbers
 
Dervy bis-155-week-3-quiz-new
Dervy bis-155-week-3-quiz-newDervy bis-155-week-3-quiz-new
Dervy bis-155-week-3-quiz-new
 

Similar to Practica dos

Excel shortcut keys and formulas
Excel shortcut keys and formulasExcel shortcut keys and formulas
Excel shortcut keys and formulasDABBETA DIVYA
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)Saifur Rahman
 
Excel macro for solving a polynomial equation
Excel macro for solving a polynomial equationExcel macro for solving a polynomial equation
Excel macro for solving a polynomial equationUpendra Lele
 
Excel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docxExcel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docxgunjangupta861854
 
Excel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docxExcel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docxgunjangupta861854
 
Fp in scala part 2
Fp in scala part 2Fp in scala part 2
Fp in scala part 2Hang Zhao
 
Python-3-compiled-Cheat-Sheet-version-3.pdf
Python-3-compiled-Cheat-Sheet-version-3.pdfPython-3-compiled-Cheat-Sheet-version-3.pdf
Python-3-compiled-Cheat-Sheet-version-3.pdfletsdism
 
R Cheat Sheet for Data Analysts and Statisticians.pdf
R Cheat Sheet for Data Analysts and Statisticians.pdfR Cheat Sheet for Data Analysts and Statisticians.pdf
R Cheat Sheet for Data Analysts and Statisticians.pdfTimothy McBush Hiele
 
Matlab level 1.pptx
Matlab level 1.pptxMatlab level 1.pptx
Matlab level 1.pptxAbanobGozef
 
Excel Shortcuts & Formulas
Excel Shortcuts & FormulasExcel Shortcuts & Formulas
Excel Shortcuts & FormulasBikash Roy
 
cheatsheet from DataCamp.pdf
cheatsheet from DataCamp.pdfcheatsheet from DataCamp.pdf
cheatsheet from DataCamp.pdfRakesh Nimhan
 
Lecture 3 and 4.pptx
Lecture 3 and 4.pptxLecture 3 and 4.pptx
Lecture 3 and 4.pptxMAHAMASADIK
 
Excel function
Excel functionExcel function
Excel functionSirajRock
 

Similar to Practica dos (20)

Mcq cpup
Mcq cpupMcq cpup
Mcq cpup
 
Excel 2010 keyboard shortcut
Excel 2010 keyboard shortcutExcel 2010 keyboard shortcut
Excel 2010 keyboard shortcut
 
Excel shortcuts
Excel shortcutsExcel shortcuts
Excel shortcuts
 
Excel shortcut keys and formulas
Excel shortcut keys and formulasExcel shortcut keys and formulas
Excel shortcut keys and formulas
 
Excel 2013 keyboard shortcut
Excel 2013 keyboard shortcutExcel 2013 keyboard shortcut
Excel 2013 keyboard shortcut
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
 
Excel macro for solving a polynomial equation
Excel macro for solving a polynomial equationExcel macro for solving a polynomial equation
Excel macro for solving a polynomial equation
 
Python crush course
Python crush coursePython crush course
Python crush course
 
Excel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docxExcel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docx
 
Excel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docxExcel Macros and VBA Demo.docx
Excel Macros and VBA Demo.docx
 
Python Programming
Python Programming Python Programming
Python Programming
 
Fp in scala part 2
Fp in scala part 2Fp in scala part 2
Fp in scala part 2
 
Python-3-compiled-Cheat-Sheet-version-3.pdf
Python-3-compiled-Cheat-Sheet-version-3.pdfPython-3-compiled-Cheat-Sheet-version-3.pdf
Python-3-compiled-Cheat-Sheet-version-3.pdf
 
R Cheat Sheet for Data Analysts and Statisticians.pdf
R Cheat Sheet for Data Analysts and Statisticians.pdfR Cheat Sheet for Data Analysts and Statisticians.pdf
R Cheat Sheet for Data Analysts and Statisticians.pdf
 
Matlab level 1.pptx
Matlab level 1.pptxMatlab level 1.pptx
Matlab level 1.pptx
 
Excel Shortcuts & Formulas
Excel Shortcuts & FormulasExcel Shortcuts & Formulas
Excel Shortcuts & Formulas
 
belajar VBA
belajar VBAbelajar VBA
belajar VBA
 
cheatsheet from DataCamp.pdf
cheatsheet from DataCamp.pdfcheatsheet from DataCamp.pdf
cheatsheet from DataCamp.pdf
 
Lecture 3 and 4.pptx
Lecture 3 and 4.pptxLecture 3 and 4.pptx
Lecture 3 and 4.pptx
 
Excel function
Excel functionExcel function
Excel function
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Practica dos

  • 1. Curso de Visual Excel Soluciones a las Prácticas Enrique Manuel Cabello Portero Práctica nº 2 Option Explicit Sub insertarcolumna() Columns("E:E").Select Selection.Insert Shift:=xlToRight Range("E1").Select Columns("E:E").ColumnWidth = 6 End Sub Sub formatear() Range("A1:G1").Select With Selection .Interior.ColorIndex = 3 .Font.ColorIndex = 33 .Font.Bold = True .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom End With End Sub Sub borrarformato() Range("A1:G1").Select Selection.ClearFormats End Sub Sub practicados() Dim fila As Byte Dim beneficio, subtotal As Integer Cells(2, 5).Select For fila = 2 To 7 subtotal = Cells(fila, 2) * Cells(fila, 4) Cells(fila, 5) = subtotal Cells(fila, 6) = subtotal * 0.16 Cells(fila, 7) = subtotal * 1.16 beneficio = (Cells(fila, 4) - Cells(fila, 3)) * Cells(fila, 2) Cells(fila, 8) = beneficio Next fila End Sub