Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Help with Look up code

Hi all, i got this code from this sit and need to change it to look at a
specific workbook and have tried different ways but keep getting errors;
PLEASE HELP !!!

EmailAddr = Application.Index(Worksheets("SupplierList").Range ("M:M"), _
Application.Match(mySuppNum,
Worksheets("SupplierList").Range("A:A"), 0))

I need it to look for mySuppNum in the workbook "Recon_Master" where the
worksheet ("SupplierList") is resident and then look up the e-mail
address in column M.


Thanks in advance.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Look up code

With Workbooks("Recon_Master").Worksheets("SupplierList ")
EmailAddr = Application.Index(.Range("M:M"), _
Application.Match(mySuppNum,.Range("A:A"), 0))
End With

--
Regards,
Tom Ogilvy


"Tempy" wrote in message
...
Hi all, i got this code from this sit and need to change it to look at a
specific workbook and have tried different ways but keep getting errors;
PLEASE HELP !!!

EmailAddr = Application.Index(Worksheets("SupplierList").Range ("M:M"), _
Application.Match(mySuppNum,
Worksheets("SupplierList").Range("A:A"), 0))

I need it to look for mySuppNum in the workbook "Recon_Master" where the
worksheet ("SupplierList") is resident and then look up the e-mail
address in column M.


Thanks in advance.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Help with Look up code

Thanks for your patience & help Tom, I am getting there even if it is
slowly.

Best regards,

Les Stout



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Help with Look up code

Hi Tom, just tried that code and i get an an error message ?
< Subscript out of Range



Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Look up code

My typo. I could have sworn I put in the .xls

With Workbooks("Recon_Master.xls").Worksheets("Supplier List")
EmailAddr = Application.Index(.Range("M:M"), _
Application.Match(mySuppNum,.Range("A:A"), 0))
End With


If that doesn't fix it, then you don't have a sheet named SupplierList in
Recon_Master.xls

--
Regards,
Tom Ogilvy


"Tempy" wrote in message
...
Hi Tom, just tried that code and i get an an error message ?
< Subscript out of Range



Tempy

*** Sent via Developersdex http://www.developersdex.com ***





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Help with Look up code

Thanks Tom, i should have seen that as well !!

best regards,

Les Stout


*** Sent via Developersdex http://www.developersdex.com ***
Reply
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
How to make a button VBA code reference other VBA code subroutines??? gunman[_9_] Excel Programming 4 September 27th 05 01:01 AM
Create a newworksheet with VBA code and put VBA code in the new worksheet module ceshelman Excel Programming 4 June 15th 05 04:37 PM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM


All times are GMT +1. The time now is 12:13 AM.

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

About Us

"It's about Microsoft Excel"