Skip to main content
Home Programming with Excel VBA
Main navigation
  • Home
  • Lists
    Lessons Exercises Badges Patterns Principles
  • Search
  • Login
Lessons
  • + Getting ready
    • What is the course about?
    • Why should you care?
    • How the course runs
    • Working together
    • Gather.Town
    • Using this site
    • Exercises
    • Feedback
    • When you get stuck
    • How to succeed
    • Set up Excel
    • Your professor
    • Let's get into it!
  • + Simple programs
    • The first program
    • Writing the first program
    • Adela's turn
    • Generalize
    • Dialogs
    • Numeric expressions
    • Strings
    • Easy is good
    • Debugging
    • More debugging
    • Another worked example
    • Exercises
  • + Decisions
    • If-then-else
    • Logical operators
    • Multiway
    • Nested ifs
    • Guard pattern
    • Basic validation: strings
    • Basic validation: numeric
    • Better vladidation
    • Tickets walkthrough
    • Vladidation in C#
    • Exercises
  • + Data analysis
    • Data tables
    • Ranges
    • Processing a Range
    • Normalizing
    • Range validation
    • Validate then process
    • Exercise walkthrough
    • Filtering
    • Min and max
    • Adela programs
    • Exercises
  • + Extras
    • Common errors
    • Excel objects
    • Excel on Macs
    • Rounding numbers
    • Shortcut keys
    • VBA documentation

Custom tip amount

Challenge
No

Change the tip program, so that the user can enter a custom tip amount. Instead of 0.15, the user can enter whatever s/he wants.

The worksheet could start like this:

Start

The user clicks the button and sees:

15% tip

If the user changes 0.15 to 0.2 and clicks the button:

20% tip

Hints:

  • Start by adding a row for tip rate on the worksheet.
  • Add a new variable to the code.

Upload your worksheet.

If you were logged in as a student, you could submit a solution to this exercise.
Where referenced
Writing the first program

Creative Commons Attribution-ShareAlike 4.0      Terms of use      Powered by Skilling