Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Worksheet Functions

I am trying to codify Excel's Match function in VBA. Somewhere I have
a syntax error. I cannot figure it out. I am just learning about the
"Application.WorksheetFunction" syntax. Can you help me with writing
the Match argument?

Range("A10") =
Application.WorksheetFunction.Match(Range("L8").Te xt,Range("A1:A550"),0)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Worksheet Functions

Hi Alistre,

Try:

Dim Res As Variant

Res = Application. _
Match(Range("L8").Value, Range("A1:A550"), 0)
Range("A10").Value = Res


---
Regards,
Norman


"alistre" wrote in message
oups.com...
I am trying to codify Excel's Match function in VBA. Somewhere I have
a syntax error. I cannot figure it out. I am just learning about the
"Application.WorksheetFunction" syntax. Can you help me with writing
the Match argument?

Range("A10") =
Application.WorksheetFunction.Match(Range("L8").Te xt,Range("A1:A550"),0)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Worksheet Functions

Thanks a lot. That worked perfect. I'm curious why the
"Application.WorksheetFunction" part was shortened to "Application".
Also, although the code worked, VBA didn't seem to recognize that
"Match" could follow "Application" when I tried to use Complete Word.
Do you know either answer? Thanks again.

Norman Jones wrote:
Hi Alistre,

Try:

Dim Res As Variant

Res = Application. _
Match(Range("L8").Value, Range("A1:A550"), 0)
Range("A10").Value = Res


---
Regards,
Norman


"alistre" wrote in message
oups.com...
I am trying to codify Excel's Match function in VBA. Somewhere I have
a syntax error. I cannot figure it out. I am just learning about the
"Application.WorksheetFunction" syntax. Can you help me with writing
the Match argument?

Range("A10") =
Application.WorksheetFunction.Match(Range("L8").Te xt,Range("A1:A550"),0)


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Worksheet Functions

Hi Alistre,

See:

http://tinyurl.com/o7lpe

or perform a google groups search using Ttappale error and WorksheetFuntion
as keys.


---
Regards,
Norman



"alistre" wrote in message
ups.com...
Thanks a lot. That worked perfect. I'm curious why the
"Application.WorksheetFunction" part was shortened to "Application".
Also, although the code worked, VBA didn't seem to recognize that
"Match" could follow "Application" when I tried to use Complete Word.
Do you know either answer? Thanks again.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Worksheet Functions

Hi Alistre,

or perform a google groups search using Ttappale error and
WorksheetFuntion
as keys.


Turning on the light while I type:

or perform a google groups search using 'Trappable error' and
'WorksheetFuntion'
as keys.



---
Regards,
Norman




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Worksheet Functions

Hi Alistre,

See also Tom Ogilvy's response in your 'Using Excel functions in VBA'
thread.



---
Regards,
Norman


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
Worksheet Functions Denrae Excel Worksheet Functions 5 May 7th 10 12:44 AM
Is there such worksheet functions... Conan Kelly Excel Worksheet Functions 4 October 13th 05 10:11 PM
Using VBA Functions in a worksheet Gary''s Student Excel Programming 4 September 6th 05 04:57 PM
Worksheet functions Nadji New Users to Excel 2 June 10th 05 06:25 PM
Public Functions As Worksheet Available Functions Steve King Excel Programming 3 February 12th 05 07:55 PM


All times are GMT +1. The time now is 04:43 PM.

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"