I used to type Excel-Vba code to show a certain text directly in a certain cell based on the value of another cell Explaining the details, the table will be as follows:
- I will input the cell from column A to A3: A13
- Print your comment, like if a1 - Excellent if A2 - good work
- This code is a category of 40 grade entries Must work for an entry of
grade ----- - Comments A1 ------ Excellent B2 ------ work harder A 1 ------ Excellent B1 ------ Satisfactory A2 ------ Good job
The following code continues till it receives a student in a column which has not been classified:
Sub-grade comments () The form of slow-grade string In the form of a comment, the string is completed as demat Nk i = 3 'the starting line I & Gt; 0 grade = range ("A" & amp; i) If the grade = "A1" then comment = "Excellent" Elsef grade = "A2" then comment = "good work" ales grade = "b1" then comment = "satisfactorily" LSE grade = "b2" then comment = "Work hard" end if grade = vbNullString then exit Else range ("B" & amp; i) = Comment i = i + 1 end if loop ending sub
No comments:
Post a Comment