Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
James Cornthwaite
 
Posts: n/a
Default My first macro - doesnt work - function not recognised

I have written my own function FindNominal (as below) in a macro in excel. I
want to use this function repeatedly in my excel spreadsheet.


Function FindNominal(NomCode)

FindNominal = Vlookup(NomCode, IMPORTDOC, 5 false)
End Function


but it does NOT work.


It reports
Vlookup is not recognised.
Do i need to write an import statement?

IMPORTDOC is defined as a range of cells in excel by the name, define
command.
I take it this is acceptable?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DJH
 
Posts: n/a
Default My first macro - doesnt work - function not recognised

Function FindNominal(NomCode)

FindNominal = WorksheetFunction.VLookup(NomCode, Range("IMPORTDOC"), 5,
False)
End Function


"James Cornthwaite" wrote in message
...
I have written my own function FindNominal (as below) in a macro in excel.
I
want to use this function repeatedly in my excel spreadsheet.


Function FindNominal(NomCode)

FindNominal = Vlookup(NomCode, IMPORTDOC, 5 false)
End Function


but it does NOT work.


It reports
Vlookup is not recognised.
Do i need to write an import statement?

IMPORTDOC is defined as a range of cells in excel by the name, define
command.
I take it this is acceptable?

Thanks





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
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Function triggering a macro Leon Excel Worksheet Functions 1 December 22nd 05 07:26 AM
Function Macro for Nested IF Qaspec Excel Worksheet Functions 5 March 10th 05 07:25 PM
How do I record a macro which should work on multiple files ? Venkataraman.P.E Excel Discussion (Misc queries) 2 January 16th 05 10:26 AM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 3 December 13th 04 08:43 PM


All times are GMT +1. The time now is 08:22 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"