Skip to content

Instantly share code, notes, and snippets.

@adam704a
Created November 9, 2018 23:53
Show Gist options
  • Save adam704a/4550dec2d137cb681804d8e20dff0113 to your computer and use it in GitHub Desktop.
Save adam704a/4550dec2d137cb681804d8e20dff0113 to your computer and use it in GitHub Desktop.
Get MDA 1 Treatment
Sub MDA1()
Dim counter As Integer
Dim response As Integer
response = MsgBox("Running macro will reset data entered manually on target population. Do you wish to continue?", vbYesNo)
Select Case response
Case vbYes
For counter = 9 To 1000
'--- If MDA 1 implmented ---
If Worksheets("MDA1").Cells(counter, 4) = "MDA1 (IVM+ALB)" Then
'--- PreSAC ---
'--- Worksheets("MDA1").Cells(counter, 6) = "Not eligible" ---
'--- SAC ---
Worksheets("MDA1").Cells(counter, 7) = Worksheets("COUNTRY_INFO").Cells(counter, 6)
'--- Adults ---
Worksheets("MDA1").Cells(counter, 8) = Worksheets("COUNTRY_INFO").Cells(counter, 7)
'--- Else ---
'--- Worksheets("MDA1").Cells(counter, 6) = " " ---
'--- Worksheets("MDA1").Cells(counter, 7) = " " ---
'--- Worksheets("MDA1").Cells(counter, 8) = " " ---
End If
Next counter
Case vbNo
End Select
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment