Problem with VLOOKUP formula

Topics: User Forum
Feb 4, 2010 at 10:13 PM

I am using PHPExcel 1.7.2 and anytime I include a formula with VLOOKUP, I get a workbook which is 0 bytes long.  The actual formula is =IF(LEN(B6)=5,VLOOKUP(B6,Vendors!$A:$K,3,FALSE),"")

If I remove the = so that the formula goes in as text, everything works fine.

Is this a known problem with VLOOKUP?

Thanks

Coordinator
Feb 4, 2010 at 11:14 PM
Edited Feb 4, 2010 at 11:14 PM

It isn't a known problem. I'll take a look and see if I can replicate it;

Although we don't currently support cell ranges of the type $A:$K without a row number. Try adding the row number
e.g.
=IF(LEN(B6)=5,VLOOKUP(B6,Vendors!$A6:$K6,3,FALSE),"")
and see if that works

Feb 5, 2010 at 1:44 PM

Thank you for the super-fast reply.  The cell range was the problem.  When I specified the range as "$A2:$K9" the issue disappeared.

 

Jul 6, 2010 at 4:32 AM
Edited Jul 6, 2010 at 4:33 AM

Hi, for my case I am using PHPExcel 1.7.3. The excel sheet's formula is like this "=VLOOKUP(B6,Vendors!A:K,2,0)". So I tried to overwrite the formula programatically to become like what you suggested above; "=VLOOKUP(B6,Vendors!$A1:$K600,2,0)", and when the system read that overwrote cell, it returns an error from "Cell.php".

Error code is :

Invalid cell coordinate

FYI, in the excel workbook there are over 17 sheets.

Please help.