POV-Ray : Newsgroups : povray.off-topic : Excel lookup() trouble : Re: Excel lookup() trouble Server Time
29 Sep 2024 23:26:56 EDT (-0400)
  Re: Excel lookup() trouble  
From: scott
Date: 26 Jan 2009 03:28:34
Message: <497d7432@news.povray.org>
> Suppose I have a spreadsheet with 3 columns, thus:
> A,A,3
> A,B,1
> A,C,4
> B,A,1
> B,B,5
> B,C,9
> C,A,2
> C,B,6
> C,C,5
>
> A cell with =lookup("ac",concatenate(a1:a9,b1:b9),c1:c9) returns the value 
> 4, as is expected.  But if you then sort a1:c9 by column b, the lookup 
> returns...3?

The lookup() function only works if the list you are looking up in is sorted 
in ascending order.  By sorting the cells by column B, 
concatenate(a1:a9,b1:b9) is no longer is ascending order.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.