Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Lookup-function does not work

I have a simple VBA sub:

sub test
Cells(2, 3).FormulaR1C1 = "=LOOKUP(3;R1C2:R5C2;R1C1:R5C1)"
end sub

Result is error ('Run-time error '1004': Application-defined or object
defined error'). Is this Excel-bug or am I missing something?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Lookup-function does not work

your syntax is incorrect. Please read HELP on spreadsheet functions

Cells(1, 1).FormulaR1C1 = "=LOOKUP( 3 , R1C2:R5C2 ,R1C3:R5C3 )"

separate using commas




in this example the value 3 is looked up in the range B1:B5 and the match
in C1:C5 ( the 2nd column of t he range) is returned


"SamMy" wrote:

I have a simple VBA sub:

sub test
Cells(2, 3).FormulaR1C1 = "=LOOKUP(3;R1C2:R5C2;R1C1:R5C1)"
end sub

Result is error ('Run-time error '1004': Application-defined or object
defined error'). Is this Excel-bug or am I missing something?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Lookup-function does not work

Thanks.

"Patrick Molloy" kirjoitti:

your syntax is incorrect. Please read HELP on spreadsheet functions

Cells(1, 1).FormulaR1C1 = "=LOOKUP( 3 , R1C2:R5C2 ,R1C3:R5C3 )"

separate using commas




in this example the value 3 is looked up in the range B1:B5 and the match
in C1:C5 ( the 2nd column of t he range) is returned


"SamMy" wrote:

I have a simple VBA sub:

sub test
Cells(2, 3).FormulaR1C1 = "=LOOKUP(3;R1C2:R5C2;R1C1:R5C1)"
end sub

Result is error ('Run-time error '1004': Application-defined or object
defined error'). Is this Excel-bug or am I missing something?

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
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
need a function that will work using multiple work books and sheet capt c Excel Worksheet Functions 1 March 30th 09 10:20 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM
how do I get lookup to work Grant Excel Worksheet Functions 3 March 8th 05 10:33 PM
Lookup Doesn't Work spalmarez Excel Worksheet Functions 3 November 9th 04 08:23 PM


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