[Solved] Conditional data from other tab

Discuss the spreadsheet application

[Solved] Conditional data from other tab

Postby macarrier » Sat Dec 14, 2019 9:34 pm

Good day everyone,

I'm new here, so please be gentle.

So here's the thing. I'm in a motorcycle club and I'm in charge of building our annual ride calendar. To do so, I'm using 2 spreadsheets. The first one (Catalog) contains all of our available rides (Ride name, Length, Suggested Departure Time, Estimated Arrival Time columns) and the second is my calendar (Ride name, Length, Departure Time colums).

In my calendar, I already populated the Ride Name field content with a dropdown list filled with all the names found in the Catalog tab.

So what I would like to do is fill the Length field in my calendar automatically with the data found in the Catalog.Length tab when a ride is selected from the dropdown list.

How can I achieve this?

Thanks all for your time!
Last edited by macarrier on Sat Dec 14, 2019 11:45 pm, edited 1 time in total.
OpenOffice 4.1.5, Windows 10
macarrier
 
Posts: 4
Joined: Sat Dec 14, 2019 9:20 pm

Re: conditional data from other tab

Postby FJCC » Sat Dec 14, 2019 10:28 pm

You can do this with the VLOOKUP function. If you post a small example document, someone could demonstrate that. To upload a file, click Post Reply and look for the Upload Attachment tab just below the box where you type a reposne.
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7623
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: conditional data from other tab

Postby macarrier » Sat Dec 14, 2019 11:05 pm

Thanks for your response FJCC. here's the file.
Attachments
Calendrier Randonnées AM St-Hubert.xls
Tabs in use in this project are Catalogue and 2020
(65.5 KiB) Downloaded 10 times
OpenOffice 4.1.5, Windows 10
macarrier
 
Posts: 4
Joined: Sat Dec 14, 2019 9:20 pm

Re: conditional data from other tab

Postby FJCC » Sat Dec 14, 2019 11:13 pm

See the formula in 2020.D4
Code: Select all   Expand viewCollapse view
=IF(ISBLANK(C4);"";VLOOKUP(C4;Catalogue.$B$2:$C$74;2;0))
Attachments
Motorcycles.ods
(25.62 KiB) Downloaded 11 times
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7623
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: conditional data from other tab

Postby macarrier » Sat Dec 14, 2019 11:32 pm

ok, I read about VLOOKUP. So, let's say I'm on tab 2020 changing the DESTINATION value using the dropdown for the ride found on line 3 of the Catalogue tab.

From what I understood, VLOOKUP should look like :

VLOOKUP([Column index][Row Index], Catalogue.B2:B300;3;1). In this case [Column index][Row Index] corresponds to C2. Though, I'm getting a 502 error...

I thought I was asking OO to search for a correspondence between the content of C2 of the current tab and Catalogue.B2:B300. When found, return the value found in the 3rd column.
OpenOffice 4.1.5, Windows 10
macarrier
 
Posts: 4
Joined: Sat Dec 14, 2019 9:20 pm

Re: conditional data from other tab

Postby macarrier » Sat Dec 14, 2019 11:41 pm

Ho sweet! So close! Thanks again FJCC!
OpenOffice 4.1.5, Windows 10
macarrier
 
Posts: 4
Joined: Sat Dec 14, 2019 9:20 pm


Return to Calc

Who is online

Users browsing this forum: No registered users and 10 guests