vlookup

Discuss the spreadsheet application
Post Reply
rainbow
Posts: 1
Joined: Tue Aug 14, 2018 1:18 pm

vlookup

Post by rainbow »

Hi all,
I am trying to manage a small camping ground like thing, I have attached what I've done so far.

The problem that I can't seem to solve is the following:

In the 'Settings'-tab I have a list of the various spots, along with what we charge for them per night.
Then in the 'Administration'-tab, in column B, I have drop-down-lists which get their data from this list in 'Settings', so that I can calculate what people have to pay.
But try to pick one of the items from the drop down and you see what's wrong: the 'vlookup' picks the wrong item / line from the list. Why is that?
Attachments
Camping.ods
(16.46 KiB) Downloaded 85 times
OpenOffice 4.1.1 / Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: vlookup

Post by Villeroy »

[Tutorial] VLOOKUP questions and answers
A spreadsheet will never work as a reliable database surrogate, no matter how many elaborated formulas, formatting and macro code you throw at it. Your spreadsheet will lead to misunderstandings and loss of money.
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
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: vlookup

Post by RusselB »

First off, Welcome to the Forums.
The problem you are having is due to either your search range not being sorted in alphabetical order or due to the fact that you don't have the 4th parameter stipulated in the VLOOKUP.
Personally I'd just put a 0 in as the 4th parameter, rather than trying to sort the search range.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Post Reply