LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default vlookup combo box

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using vlookup with combo box Larry Excel Worksheet Functions 4 November 5th 08 05:51 PM
Combo Box and VLOOKUP Learning Excel Excel Discussion (Misc queries) 7 January 19th 08 10:09 AM
Combo Box / VLOOKUP Welly Excel Programming 6 January 2nd 08 03:12 AM
vlookup from a combo box? MA via OfficeKB.com Excel Discussion (Misc queries) 3 July 8th 05 10:34 PM
Vlookup from Combo Box ACase Excel Discussion (Misc queries) 2 March 23rd 05 05:17 PM


All times are GMT +1. The time now is 06:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"