C
Charles L. Snyder
Hi
I am using office 2003 excel.
I have a userform with a combo box which uses another ws (AutoEntry!
a1:a20) to populate the combo box. When an entry is selected, I use a
case conditional (see below) to assign values to variables (cpt, icd9,
etc), and then fill in the primary ws. Obviously, using case
statements is stupid - I want to have a 3 or 4 column, several hundred
row ws from which the first column populates the drop down combo box,
and VLOOKUP is used to get the associated (cpt, icd9, etc) variable
values, but I'm stuck viz how to do this.
Function FxEnter(my_select)
LastMTcell
Select Case my_select
Case Is = "Circumcision, FH"
icd9 = "605"
cpt = "54161"
cpt2 = ""
Case Is = "Ing Hernia Uni < 6mo"
icd9 = "550.90"
cpt = "49495"
cpt2 = "49320"
Case Is = "Ing Hernia Bil < 6mo"
icd9 = "550.92"
cpt = "4949550"
cpt2 = "49320"
Case Is = "HPS Lap"
icd9 = "750.5"
cpt = "43659"
cpt2 = "49320"
Case Is = "Meatotomy"
icd9 = "598.8"
cpt = "53020"
End Select
ActiveCell.FormulaR1C1 = "Snyder, Charles L."
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = Format(Now, "mm/dd/yyyy")
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = MedRec
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = icd9
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = dx2
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = dx3
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = cpt
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = cpt2
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = cpt3
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "CMH"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "No"
UserForm1.Hide
TIA
clsnyder
I am using office 2003 excel.
I have a userform with a combo box which uses another ws (AutoEntry!
a1:a20) to populate the combo box. When an entry is selected, I use a
case conditional (see below) to assign values to variables (cpt, icd9,
etc), and then fill in the primary ws. Obviously, using case
statements is stupid - I want to have a 3 or 4 column, several hundred
row ws from which the first column populates the drop down combo box,
and VLOOKUP is used to get the associated (cpt, icd9, etc) variable
values, but I'm stuck viz how to do this.
Function FxEnter(my_select)
LastMTcell
Select Case my_select
Case Is = "Circumcision, FH"
icd9 = "605"
cpt = "54161"
cpt2 = ""
Case Is = "Ing Hernia Uni < 6mo"
icd9 = "550.90"
cpt = "49495"
cpt2 = "49320"
Case Is = "Ing Hernia Bil < 6mo"
icd9 = "550.92"
cpt = "4949550"
cpt2 = "49320"
Case Is = "HPS Lap"
icd9 = "750.5"
cpt = "43659"
cpt2 = "49320"
Case Is = "Meatotomy"
icd9 = "598.8"
cpt = "53020"
End Select
ActiveCell.FormulaR1C1 = "Snyder, Charles L."
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = Format(Now, "mm/dd/yyyy")
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = MedRec
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = icd9
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = dx2
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = dx3
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = cpt
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = cpt2
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = cpt3
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "CMH"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "No"
UserForm1.Hide
TIA
clsnyder