Excel Tutorial

20120729

ElseIf Structure


Sub ElseIf_Structure()
Dim marks As Integer
marks = Application.InputBox("Give Marks")
If marks >= 33 And marks <= 50 Then
MsgBox "Third"
ElseIf marks > 50 And marks < 60 Then
MsgBox "Secend"
ElseIf marks >= 60 Then
MsgBox "First"
Else
MsgBox "Fail"
End If
End Sub
Posted by Bharat at 12:56
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2017 (8)
    • ►  May (5)
    • ►  March (1)
    • ►  February (2)
  • ►  2013 (11)
    • ►  August (1)
    • ►  July (6)
    • ►  April (1)
    • ►  February (3)
  • ▼  2012 (112)
    • ►  November (2)
    • ►  October (3)
    • ►  September (4)
    • ►  August (88)
    • ▼  July (15)
      • ElseIf Structure
      • Multiple-line statements - Syntax
      • SpecialCells method to find Last Used Column in wo...
      • UsedRange method to find number of used columns in...
      • UsedRange method to find number of used rows in a ...
      • End(xlUp) method to determine Last Row with Data, ...
      • largest value in range
      • Smallest Value in Range
      • Remove Special Characters
      • Rank If Passed
      • Lookup If Blank
      • 3) Table 1 and 2 in different books and different ...
      • 2) Table 1 and 2 in different sheets.
      • 1) Table 1 and 2 same sheet.
      • Unique Desgnation
Picture Window theme. Powered by Blogger.