[Solved] Lookup error with unsorted lists
-
- Posts: 12
- Joined: Mon Jun 18, 2012 5:56 pm
[Solved] Lookup error with unsorted lists
Hello all.
I hate to ask this often repeated question as I know it has been addressed in many guises.
I have tried the Match/Index work around with no success, and many other ideas.
The attached cacl file has multiple attempts already in the cells.
We are looking at the 'Product Printer' Page with reference to Cells D9 & D18 for example.
Basically I am trying to extract data to this page so I can print out BOM's for each product.
The 'Lookup' formula works only for the first product due to 'SORTING' issues but as soon as I select any other product it goes pear shaped.
I appreciate any input on this one as always.
best wishes
Dean.H
I hate to ask this often repeated question as I know it has been addressed in many guises.
I have tried the Match/Index work around with no success, and many other ideas.
The attached cacl file has multiple attempts already in the cells.
We are looking at the 'Product Printer' Page with reference to Cells D9 & D18 for example.
Basically I am trying to extract data to this page so I can print out BOM's for each product.
The 'Lookup' formula works only for the first product due to 'SORTING' issues but as soon as I select any other product it goes pear shaped.
I appreciate any input on this one as always.
best wishes
Dean.H
- Attachments
-
- 2012 Nomad Products v14.ods
- (114.29 KiB) Downloaded 199 times
Last edited by thomasjk on Sun Jul 22, 2012 8:46 pm, edited 1 time in total.
Reason: Mark thread [Solved] and add green checkmark
Reason: Mark thread [Solved] and add green checkmark
OpenOffice 3.3 on Win7
Re: Lookup error with unsorted lists
A spreadsheet is not a database and all the lookup functions are designed for a different purpose. You must not use LOOKUP when misusing a spreadsheet as database. You've got to use VLOOKUP with zero as 4th argument.
Then you should turn off the regular expressions in Tools>Options>Calc>Calculation and turn on the "match whole cells" option.
[Tutorial] VLOOKUP questions and answers
Then you should turn off the regular expressions in Tools>Options>Calc>Calculation and turn on the "match whole cells" option.
[Tutorial] VLOOKUP questions and answers
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Lookup error with unsorted lists
Hi,
this is an extract from the help file about LOOKUP:
Additionally, the search vector for the LOOKUP must be sorted ascending, otherwise the search will not return any usable results.
So your problem is just the unsorted search vector. Correct it and it will work.
Frank
this is an extract from the help file about LOOKUP:
Additionally, the search vector for the LOOKUP must be sorted ascending, otherwise the search will not return any usable results.
So your problem is just the unsorted search vector. Correct it and it will work.
Frank
Frank
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Lookup error with unsorted lists
No, it won't work because it returns false positives for *any* value >= the first one.fst wrote:Hi,
this is an extract from the help file about LOOKUP:
Additionally, the search vector for the LOOKUP must be sorted ascending, otherwise the search will not return any usable results.
So your problem is just the unsorted search vector. Correct it and it will work.
Frank
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 12
- Joined: Mon Jun 18, 2012 5:56 pm
Re: Lookup error with unsorted lists
Ok, trying that now.
Do you mean turn on : 'Search criteria = and < > must apply to whole cell'
Cheers
Do you mean turn on : 'Search criteria = and < > must apply to whole cell'
Cheers
OpenOffice 3.3 on Win7
-
- Posts: 12
- Joined: Mon Jun 18, 2012 5:56 pm
Re: Lookup error with unsorted lists
This list would be 2 complicated for user interpretation to have it sorted so its just not an option. But I have considered it.
OpenOffice 3.3 on Win7
-
- Posts: 12
- Joined: Mon Jun 18, 2012 5:56 pm
Re: Lookup error with unsorted lists
I have tried the VLOOKUP formula with 0 as the 4th argument and get a #VALUE error.
I have posted the changed CALC file for inspection.
Dean
I have posted the changed CALC file for inspection.
Dean
- Attachments
-
- 2012 Nomad Products v14.ods
- (112.04 KiB) Downloaded 228 times
OpenOffice 3.3 on Win7
Re: Lookup error with unsorted lists
=VLOOKUP($D$5 ; $'INPUT PAGE'.$C$19:$AG$58 ; 31 ; 0)
looks up in C and returns the exactly matching value from the 31st column (AG) regardless of sort order.
looks up in C and returns the exactly matching value from the 31st column (AG) regardless of sort order.
Last edited by Villeroy on Sun Jul 22, 2012 5:52 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- JohnSUN-Pensioner
- Volunteer
- Posts: 876
- Joined: Fri Jan 14, 2011 1:21 pm
- Location: Kyiv, Ukraine
Re: Lookup error with unsorted lists
D5 =VLOOKUP($D$5;'INPUT PAGE'.$C$19:$AG$58;24;0)
D18 =VLOOKUP($D$5;'INPUT PAGE'.$C$19:$AG$58;31;0)
D18 =VLOOKUP($D$5;'INPUT PAGE'.$C$19:$AG$58;31;0)
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
-
- Posts: 12
- Joined: Mon Jun 18, 2012 5:56 pm
Re: Lookup error with unsorted lists
[SOLVED]
Nice one gents.
I am not sure how this formula works but it does work and I really appreciate the help.
Cheers again.
Dean
Nice one gents.
I am not sure how this formula works but it does work and I really appreciate the help.
Cheers again.
Dean
OpenOffice 3.3 on Win7
Re: Lookup error with unsorted lists
The $ references are dealt with in
[Tutorial] Absolute, relative and mixed references
and Vlookup in
[Tutorial] VLOOKUP questions and answers
It is worth reading up on them, and asking further questions for clarification.
[Tutorial] Absolute, relative and mixed references
and Vlookup in
[Tutorial] VLOOKUP questions and answers
It is worth reading up on them, and asking further questions for clarification.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS