Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Excel / January 2006



Tip: Looking for answers? Try searching our database.

Crossover from Window - Find / VBLOOKUP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles L. Snyder - 29 Jan 2006 20:26 GMT
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
Bob Greenblatt - 30 Jan 2006 13:19 GMT
On 1/29/06 3:26 PM, in article
1138566411.125527.258000@f14g2000cwb.googlegroups.com, "Charles L. Snyder"
<clsnyder@gmail.com> wrote:

> Sub RVU_Lookup()
> Dim  my_cpt as Integer
[quoted text clipped - 14 lines]
>
> End Sub
Charlie, it will work fine on a Mac with the following changes:
Remove the SearchFormat parameter. This is not supported on the Mac. Change
the plus signs (+) in the last statement to ampersands (&). This will then
work on both platforms.

Ampersand is the preferred symbol for concatenation on both platforms.

Signature

Bob Greenblatt [MVP], Macintosh
bobgreenblattATmsnDOTcom

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.