Buy us a coffee

Range/If/Then/button triggers

  • Highest
  • Module 8 of 8 in this level
  • Open to learn
Start this skill

Watch

Watch the video to unlock the quizquiz खोलने के लिए video देखें

What you should understandआपको क्या समझना है?

  • Macro का ढाँचा: Sub RunReport() … End Sub। Cell में value: Range("B2").Value = 100; row-column से: Cells(2, 3) = C2।
  • शर्त: If Range("C2").Value > 1000 Then … Else … End If। Multi-line If में End If भूलने पर compile error आता है।
  • आखिरी भरी row: lastRow = Cells(Rows.Count, "A").End(xlUp).Row; फिर For i = 2 To lastRow … Next i से हर row पर काम।
  • Button: Developer > Insert > Form Controls > Button बनाकर macro assign करें; या shape पर right-click > Assign Macro।