View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
sammy sammy is offline
external usenet poster
 
Posts: 48
Default Problem with Lookup-function

Could you be more specific? No leading - what?

"Bob Phillips" kirjoitti:

The second only works because you have an error, no leadiung = <vbg

Sub test()
Cells(3, 3).FormulaR1C1 = "=sum(R1C1:R5C1)" 'Succees
Cells(4, 3).Value = "=LOOKUP(3,R1C2:R5C2,R1C1:R5C1)" 'Succees
Cells(2, 3).FormulaR1C1 = "=LOOKUP(3,R1C2:R5C2,R1C1:R5C1)" 'Error
End Sub



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"SamMy" wrote in message
...
Sub test()
Cells(3, 3).FormulaR1C1 = "=sum(R1C1:R5C1)" 'Succees
Cells(4, 3).Value = "LOOKUP(3;R1C2:R5C2;R1C1:R5C1)" 'Succees
Cells(2, 3).FormulaR1C1 = "=LOOKUP(3;R1C2:R5C2;R1C1:R5C1)" 'Error
End Sub

VBA in Excel 2002. Two first lines succees, but the third one gives error
'Runtime error 1004: Application or object defined error'. What's wrong

with
the third row?