![]() If s > 80 And a > 22 Then Else End If End Sub IF …Else loop is used to execute the two different results according to the evaluation of the expression. Step 4: Now express the conditions as two statements and connect with AND function. a is the main subject and s is the sum of all subjects a, b, c, d. ![]() a, b, c, d are different subjects and the marks scored for each subject is as below. ![]() Step 3: Give the marks for different subjects. Step 2: Create a function named result in VBA to do the calculation and find the total mark of all subjects. Step 1: Insert a new module inside Visual Basic Editor (VBE). If the total comes more than 80 and 22 marks on the main subject the student got passed in the exam else fail. For this, follow the below steps: You have the marks scored by a student in a different subject. In this example, you can learn how to use AND function along with comparison operators. You can download this VBA AND Excel Template here – VBA AND Excel Template Example #1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |