Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Lookup-function
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Lookup-function
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Lookup-function
I did, no leading =.
I also gave you corrected code. As I understand, in VBA you use commas regardless of your settings, Excel will transform it. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "SamMy" wrote in message ... 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? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Lookup-function
Now I got it (thank god it's friday :)).
Thank You! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Lookup-function
No argument the <G
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "SamMy" wrote in message ... Now I got it (thank god it's friday :)). Thank You! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problem with LOOKUP function | Excel Discussion (Misc queries) | |||
LOOKUP function Problem | Excel Worksheet Functions | |||
LOOKUP function problem? | Excel Worksheet Functions | |||
Lookup function problem (kg) | Excel Worksheet Functions | |||
problem lookup function | Excel Worksheet Functions |