Jump to content
Fórum Script Brasil
  • 0

Ajuda Excel if else


ericsilvapereira

Question

Sub Geral()

Sheets("Boletim de Ocorrência").Select

If H30 <= 11 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BA5").Select

ActiveCell.FormulaR1C1 = "X"

If 12 >= H30 <= 17 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BB5").Select

ActiveCell.FormulaR1C1 = "X"

If 18 >= H30 <= 24 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BC5").Select

ActiveCell.FormulaR1C1 = "X"

If 25 >= H30 <= 29 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BD5").Select

ActiveCell.FormulaR1C1 = "X"

If 30 >= H30 <= 34 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BE5").Select

ActiveCell.FormulaR1C1 = "X"

If 35 >= H30 <= 64 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BB5").Select

ActiveCell.FormulaR1C1 = "X"

If H30 >= 65 Then

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BB5").Select

ActiveCell.FormulaR1C1 = "X"

Else

Sheets("Estatística").Select

Range("BA5:BH5").Select

Selection.ClearContents

Range("BH5").Select

ActiveCell.FormulaR1C1 = "X"

End If

End If

End If

End If

End If

End If

End If

End Sub

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...