View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Can this Macro be modified?

I like doing this using row Numbers and Select Case

Sub Sonic()
With Worksheets("Oct 8 - 2054543")
For RowCount = 6 to 137
Select Case .Range("Y" & Rowcount)
case "A":
Range("BI" & Rowcount).Value = "No medical necessity for IP status;
should
have been OP"

case "B":
Range("BI" & Rowcount).Value = "Admitted with presumed acute need;
Documentation and findings did not support IP status. Should have been OP
Observation"

case "C": Range("BI" & Rowcount).Value = "No IP acuity
documented; no complication post procedure or acute intervention; should have
been OP Surgery."

case "D":
Range("BI" & Rowcount).Value = "Patient does not meet IP guidelines;
should
be OP observation"
end select
End With
End Sub

"akemeny" wrote:

I need the macro below to look first at Range BI6:BI137 and find blank cells,
then look at Range Y6:Y137 for the code information. Is that possible?

Sub Sonic()
With Worksheets("Oct 8 - 2054543")
For Each c In Range("y6:y137")
If c.Value = "A" Then
c.Offset(0, 36).Value = "No medical necessity for IP status; should
have been OP"
End If
If c.Value = "B" Then
c.Offset(0, 36).Value = "Admitted with presumed acute need;
Documentation and findings did not support IP status. Should have been OP
Observation"
End If
If c.Value = "C" Then
c.Offset(0, 36).Value = "No IP acuity documented; no complication
post procedure or acute intervention; should have been OP Surgery."
End If
If c.Value = "D" Then
c.Offset(0, 36).Value = "Patient does not meet IP guidelines; should
be OP observation"
End If
End With
End Sub