VBA basics
19. General practice question 1

Excel macro basics and applications, introduction to Excel VBA
last updated:08-17-2019

19. General practice question 1

Some of this topic was processed by machine translation. Original

Macro VBA exercises

As explained in the introduction to Macro VBA,
Extensive technical information related to Excel. _General Excel_ is a basic application of Excel operations and functions. “Macro VBA” offers a wealth of information from introductory and basic to advanced information.

For ~ Next
Get last row
Four arithmetic operations

Use the above to complete the following exercises.

VBA macro excel

In the table above, calculate the unit price in column A x the quantity in column B, and give the amount in column C.
Tips!
Calculate the unit price x quantity from the second row to the last row of the table with For Next.

Thinking time

Thinking time starts


The sinking time ends

Go to Macro VBA Practice Question Answer



Articles with the same theme "VBA basics"

16. Iterative processing (For Next)

BA's For Next is a VBA syntax for repeating the same process. There are several ways to iterate over VBA, The most frequently used, the simplest and most convenient, First of all, the VBA syntax for iteration to remember is For Next.
17. Iterative processing (Do Loop)
As a repetitive process we performed For ~ Next this time Do ~ Loop. The frequency of use is lower than that of For-Next This is something that you must remember. For-Next was to specify the number of repetitions in advance Do ~ Loop is not a repeat count but a repeat condition.
18. Get last row (End, Rows.Count)
Getting the last row of a table in an Excel worksheet is an essential technique for macro VBA. Necessity of obtaining the last row in Excel VBA Excel is a spreadsheet software, that is, it handles vertical and horizontal tables.
19. General practice question 1
20. Conditional branch (If)
You may want to process only under certain conditions or you may want to change the processing contents depending on the conditions. The If statement is used when you want to branch processing according to a condition. In many cases of automation with VBA macros
21. Conditional branch (ElseIf)
In the previous IF statement, there were two choices: true or false. This time, we will write in the case of multiple-conditional branching with an If statement that requires more branches. The statement is an If statement.
22. Conditional branch (Select Case)
There is another way to write multi-limb conditional branches other than the previous ElseIf. That is Select Case. Rather than ElseIf, this Select Case is more suitable for multiple-limb conditional branching.
23. Message box (MsgBox function)
Displays a dialog box (small screen) that displays a message. Users can select (“Yes”, “No”, “OK”, “CANCEL”, etc.) and receive the selection results. To display a message box with macro VBA, use the MsgBox function.
24. Input box (InputBox function)
Displays a message and text box in a dialog box You can get the string entered by the user. In the beginning or middle of macro VBA you may want to change the process according to user input. To achieve this the InputBox function is used in macro VBA.
25. About named arguments
An argument is a specification of a value passed when calling a function or method. There is a named argument as a description method when passing this argument. In the macro VBA description,: = is used.
26. General practice question 2
Macro VBA exercises Use the table below for message box and numeric aggregation issues. Input numerical value with InputBox function Find the sum of the numbers in column A that are greater than or equal to the specified value and display it with the MsgBox function.



  • >
  • >
  • 19. General practice question 1

  • If you find this site useful, please share and bookmark.


    I'm going to pay close attention to the description,
    If you have any mistakes or suggestions,「Contact Us」I hope you will let me know.
    Use the posted VBA code at your own risk.
    We are not liable for any damages such as data corruption.




    If you find this site useful, please share and bookmark.
    To the bottom of the text