SlideShare a Scribd company logo
1 of 19
EXCEL
VBA
HELLO!
I am Dhruyen Hadiya
I am here to give presentations
on topic Excel-VBA.
Subject: Process Modelling, Simulation
and Optimization(3170513)
Table of Contents
Visual Basic for
Applications
Finding the correct input
when only the output is
known
An action or a set of actions
that you can record
Use for what-if analysis
MACRO SOLVER
VBA GOAL SEEK
“ VBA stands for Visual Basic for
Applications. Excel VBA is Microsoft's
programming language for Excel.
Excel analysis is ubiquitous around the
world and used by businesses,
chemical & biomedical engineering of
all sizes to perform analysis.”
While we cannot directly manipulate
the main Excel software through
VBA, we can, however, master the art
of making MACROS to optimize our
time in Excel.
If you have tasks in Microsoft Excel that
you do repeatedly, you can record a
macro to automate those tasks.
● In the Code group on the Developer tab, click Record Macro.
● Optionally, enter a name for the macro in the Macro name box, enter a
shortcut key in the Shortcut key box, and a description in the Description box,
and then click OK to start recording.
● Perform the actions you want to automate, such as entering boilerplate text or
filling down a column of data.
● On the Developer tab, click Stop Recording.
How to record
MACRO?
SUBROUTINE FUNCTION
A Subroutine in VBA is a piece of
code that performs a specific task
described in the code but does not
return a result or a value.
Subroutines are used to break down
large pieces of code into small
manageable parts. Subroutines can
be recalled multiple times from
anywhere in the program
A function performs a calculation
and returns a single value. The SUM
function adds the sum of a range of
values.
GOAL
SEEK
The Goal Seek Excel function (often
referred to as What-if-Analysis) is a
method of solving for a desired output
by changing an assumption that drives
it. The function essentially uses a trial
and error approach to back-solving the
problem by plugging in guesses until it
arrives at the answer.
STEP FOR GOAL SEEK
● Create a spreadsheet in Excel that has your data.
● Click the cell you want to change. This is called the “Set cell.”
● From the Data tab, select the What if Analysis… button.
● Select Goal seek… from the drop-down menu.
● In the Goal Seek dialog, enter the new “what if” amount in the To value:
text box.
● We also need to tell Excel which cell to change.
● Click OK. Excel will overwrite the previous cell value with the new one.
SOLVER
Solver is a Microsoft Excel add-in program you can use for what-if
analysis. Use Solver to find an optimal (maximum or minimum)
value for a formula in one cell — called the objective cell — subject
to constraints, or limits, on the values of other formula cells on a
worksheet.
ALL TOGETHER
ANY
QUESTION
?
Thanks!

More Related Content

What's hot

Formulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh TiwariFormulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh TiwariAmresh Tiwari
 
An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureSukh Sandhu
 
Excel VBA programming basics
Excel VBA programming basicsExcel VBA programming basics
Excel VBA programming basicsHang Dong
 
Advances in ms excel
Advances in ms excelAdvances in ms excel
Advances in ms excelMohit Kumar
 
Performing basic computation (Microsoft Excel)
Performing basic computation (Microsoft Excel)Performing basic computation (Microsoft Excel)
Performing basic computation (Microsoft Excel)Mirea Mizushima
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS ExcelRajesh Math
 
Training On Microsoft Excel
Training On Microsoft ExcelTraining On Microsoft Excel
Training On Microsoft ExcelTimesRide
 
Creating a vlookup v1.0 050813
Creating a vlookup v1.0 050813Creating a vlookup v1.0 050813
Creating a vlookup v1.0 050813Dave Shannon
 
Pivot table and Dashboard in microsoft excel
Pivot table  and Dashboard in microsoft excelPivot table  and Dashboard in microsoft excel
Pivot table and Dashboard in microsoft excelFrehiwot Mulugeta
 
10 Excel Formulas that will help you in any Job
10 Excel Formulas that will help you in any Job10 Excel Formulas that will help you in any Job
10 Excel Formulas that will help you in any JobHitesh Biyani
 
Getting started with Microsoft Excel Macros
Getting started with Microsoft Excel MacrosGetting started with Microsoft Excel Macros
Getting started with Microsoft Excel MacrosNick Weisenberger
 

What's hot (20)

Formulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh TiwariFormulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh Tiwari
 
An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lecture
 
Excel VBA programming basics
Excel VBA programming basicsExcel VBA programming basics
Excel VBA programming basics
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Advances in ms excel
Advances in ms excelAdvances in ms excel
Advances in ms excel
 
Learn Excel Macro
Learn Excel Macro  Learn Excel Macro
Learn Excel Macro
 
50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks 50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks
 
Presentation
PresentationPresentation
Presentation
 
Microsoft excel beginner
Microsoft excel beginnerMicrosoft excel beginner
Microsoft excel beginner
 
VBA - Macro For Ms.Excel
VBA - Macro For Ms.ExcelVBA - Macro For Ms.Excel
VBA - Macro For Ms.Excel
 
Performing basic computation (Microsoft Excel)
Performing basic computation (Microsoft Excel)Performing basic computation (Microsoft Excel)
Performing basic computation (Microsoft Excel)
 
Ms excel
Ms excelMs excel
Ms excel
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS Excel
 
Microsoft Excel Seminar
Microsoft Excel SeminarMicrosoft Excel Seminar
Microsoft Excel Seminar
 
Training On Microsoft Excel
Training On Microsoft ExcelTraining On Microsoft Excel
Training On Microsoft Excel
 
Creating a vlookup v1.0 050813
Creating a vlookup v1.0 050813Creating a vlookup v1.0 050813
Creating a vlookup v1.0 050813
 
Pivot table and Dashboard in microsoft excel
Pivot table  and Dashboard in microsoft excelPivot table  and Dashboard in microsoft excel
Pivot table and Dashboard in microsoft excel
 
10 Excel Formulas that will help you in any Job
10 Excel Formulas that will help you in any Job10 Excel Formulas that will help you in any Job
10 Excel Formulas that will help you in any Job
 
MS Excel 2nd
MS Excel 2ndMS Excel 2nd
MS Excel 2nd
 
Getting started with Microsoft Excel Macros
Getting started with Microsoft Excel MacrosGetting started with Microsoft Excel Macros
Getting started with Microsoft Excel Macros
 

Similar to Excel-VBA

Microsoft Excel 101: What you must know
Microsoft Excel 101: What you must knowMicrosoft Excel 101: What you must know
Microsoft Excel 101: What you must knowSwati Chhabra
 
Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And AlertingSean Durocher
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vbarjg_vijay
 
Advanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxAdvanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxCliffordBorromeo
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical ToolsJoselito Perez
 
Ms Excel- Its uses & Functions.pptx
Ms Excel- Its uses & Functions.pptxMs Excel- Its uses & Functions.pptx
Ms Excel- Its uses & Functions.pptxVishal Doke
 
Creating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using VbaCreating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using VbaChester Tugwell
 
Microsoft excel training
Microsoft excel trainingMicrosoft excel training
Microsoft excel trainingEmilyE120
 
Tutorials on Macro
Tutorials on MacroTutorials on Macro
Tutorials on MacroAnurag Deb
 
Basic Functions - Excel 2013 Tutorial
Basic Functions - Excel 2013 TutorialBasic Functions - Excel 2013 Tutorial
Basic Functions - Excel 2013 TutorialSpreadsheetTrainer
 
Learn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in DelhiLearn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in Delhiibinstitute0
 
10 Time Saving Excel Data Entry Hacks for Small Business Owners
10 Time Saving Excel Data Entry Hacks for Small Business Owners10 Time Saving Excel Data Entry Hacks for Small Business Owners
10 Time Saving Excel Data Entry Hacks for Small Business OwnersCogneesol
 
computer applications in business unit 3
computer applications in business unit 3computer applications in business unit 3
computer applications in business unit 3Dr T.Sivakami
 

Similar to Excel-VBA (20)

Microsoft Excel 101: What you must know
Microsoft Excel 101: What you must knowMicrosoft Excel 101: What you must know
Microsoft Excel 101: What you must know
 
Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And Alerting
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vba
 
Advanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxAdvanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptx
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
 
Ms Excel- Its uses & Functions.pptx
Ms Excel- Its uses & Functions.pptxMs Excel- Its uses & Functions.pptx
Ms Excel- Its uses & Functions.pptx
 
Excel solver
Excel solverExcel solver
Excel solver
 
Creating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using VbaCreating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using Vba
 
VBA
VBAVBA
VBA
 
Microsoft excel training
Microsoft excel trainingMicrosoft excel training
Microsoft excel training
 
Tutorials on Macro
Tutorials on MacroTutorials on Macro
Tutorials on Macro
 
Basic Functions - Excel 2013 Tutorial
Basic Functions - Excel 2013 TutorialBasic Functions - Excel 2013 Tutorial
Basic Functions - Excel 2013 Tutorial
 
Learn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in DelhiLearn VBA Training & Advance Excel Courses in Delhi
Learn VBA Training & Advance Excel Courses in Delhi
 
10 Time Saving Excel Data Entry Hacks for Small Business Owners
10 Time Saving Excel Data Entry Hacks for Small Business Owners10 Time Saving Excel Data Entry Hacks for Small Business Owners
10 Time Saving Excel Data Entry Hacks for Small Business Owners
 
VBA Tips
VBA TipsVBA Tips
VBA Tips
 
computer applications in business unit 3
computer applications in business unit 3computer applications in business unit 3
computer applications in business unit 3
 
Automating SolidWorks with Excel
Automating SolidWorks with ExcelAutomating SolidWorks with Excel
Automating SolidWorks with Excel
 
Excel vba
Excel vbaExcel vba
Excel vba
 
Excel300
Excel300Excel300
Excel300
 
Print9
Print9Print9
Print9
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 

Recently uploaded (20)

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 

Excel-VBA

  • 2. HELLO! I am Dhruyen Hadiya I am here to give presentations on topic Excel-VBA. Subject: Process Modelling, Simulation and Optimization(3170513)
  • 3. Table of Contents Visual Basic for Applications Finding the correct input when only the output is known An action or a set of actions that you can record Use for what-if analysis MACRO SOLVER VBA GOAL SEEK
  • 4. “ VBA stands for Visual Basic for Applications. Excel VBA is Microsoft's programming language for Excel. Excel analysis is ubiquitous around the world and used by businesses, chemical & biomedical engineering of all sizes to perform analysis.”
  • 5. While we cannot directly manipulate the main Excel software through VBA, we can, however, master the art of making MACROS to optimize our time in Excel. If you have tasks in Microsoft Excel that you do repeatedly, you can record a macro to automate those tasks.
  • 6. ● In the Code group on the Developer tab, click Record Macro. ● Optionally, enter a name for the macro in the Macro name box, enter a shortcut key in the Shortcut key box, and a description in the Description box, and then click OK to start recording. ● Perform the actions you want to automate, such as entering boilerplate text or filling down a column of data. ● On the Developer tab, click Stop Recording. How to record MACRO?
  • 7. SUBROUTINE FUNCTION A Subroutine in VBA is a piece of code that performs a specific task described in the code but does not return a result or a value. Subroutines are used to break down large pieces of code into small manageable parts. Subroutines can be recalled multiple times from anywhere in the program A function performs a calculation and returns a single value. The SUM function adds the sum of a range of values.
  • 8.
  • 9. GOAL SEEK The Goal Seek Excel function (often referred to as What-if-Analysis) is a method of solving for a desired output by changing an assumption that drives it. The function essentially uses a trial and error approach to back-solving the problem by plugging in guesses until it arrives at the answer.
  • 10. STEP FOR GOAL SEEK ● Create a spreadsheet in Excel that has your data. ● Click the cell you want to change. This is called the “Set cell.” ● From the Data tab, select the What if Analysis… button. ● Select Goal seek… from the drop-down menu. ● In the Goal Seek dialog, enter the new “what if” amount in the To value: text box. ● We also need to tell Excel which cell to change. ● Click OK. Excel will overwrite the previous cell value with the new one.
  • 11.
  • 13. Solver is a Microsoft Excel add-in program you can use for what-if analysis. Use Solver to find an optimal (maximum or minimum) value for a formula in one cell — called the objective cell — subject to constraints, or limits, on the values of other formula cells on a worksheet.
  • 14.
  • 15.
  • 17.