C
Charles L. Snyder
Hi-
I am trying to make a workbook that is quite functional in Windows XP
Excel work on Tiger OSX Excel 2004 - with great difficultly. I got rid
of the ActiveX stuff (I think) - am trying to make a simple lookup work
- ie identify a value in a worksheet and return the value of the next
column to the right in same row...
this works in windows:
Sub RVU_Lookup()
Dim my_cpt as Integer
Dim my_rvu as Integer
my_cpt = InputBox("Enter the CPT Code...")
Sheets("RVU Lookup").Select
Columns("A:A").Select
Range("A7201").Activate
Selection.Find(What:=my_cpt, After:=ActiveCell, LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Select
my_rvu = ActiveCell.FormulaR1C1
Sheets("Operations").Select MsgBox ("The CPT code for " +
my_cpt + " is " + my_rvu)
End Sub
It doesn't work on the Mac
Neither does:
Sub RVU_Lookup()
Dim my_cpt as Integer
Dim my_rvu as Integer
Dim myRange as Range
Sheets("RVU Lookup").Select
my_cpt = InputBox("Enter the CPT Code...")
set myRange = Sheets("RVU Lookup").Range("A2:A7250")
my_rvu = Application.WorksheetFunction.VLookup(my_cpt,myRange,2)
MsgBox ("The CPT code for " + my_cpt + " is " + my_rvu)
End Sub
Thanks in advance
CLS
I am trying to make a workbook that is quite functional in Windows XP
Excel work on Tiger OSX Excel 2004 - with great difficultly. I got rid
of the ActiveX stuff (I think) - am trying to make a simple lookup work
- ie identify a value in a worksheet and return the value of the next
column to the right in same row...
this works in windows:
Sub RVU_Lookup()
Dim my_cpt as Integer
Dim my_rvu as Integer
my_cpt = InputBox("Enter the CPT Code...")
Sheets("RVU Lookup").Select
Columns("A:A").Select
Range("A7201").Activate
Selection.Find(What:=my_cpt, After:=ActiveCell, LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Select
my_rvu = ActiveCell.FormulaR1C1
Sheets("Operations").Select MsgBox ("The CPT code for " +
my_cpt + " is " + my_rvu)
End Sub
It doesn't work on the Mac
Neither does:
Sub RVU_Lookup()
Dim my_cpt as Integer
Dim my_rvu as Integer
Dim myRange as Range
Sheets("RVU Lookup").Select
my_cpt = InputBox("Enter the CPT Code...")
set myRange = Sheets("RVU Lookup").Range("A2:A7250")
my_rvu = Application.WorksheetFunction.VLookup(my_cpt,myRange,2)
MsgBox ("The CPT code for " + my_cpt + " is " + my_rvu)
End Sub
Thanks in advance
CLS