Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

OO vlookup and if

  Date: Jan 03    Category: Unix / Linux / Ubuntu    Views: 698
  

Im working on a automating a form for my futball club. Its a calc sheet.
This one that Im working on is the Game Form. At the top is a field
titled HOME and VISITOR. When I type in a number like 5 in the HOME
field LT Blue will be printed in three locations.

Where Im hitting the wall is this. When I type in the HOME and VISITOR
team number I have the HOME and VISITOR fields filled in automatically
with vlookup but, I also need all the players and their jersey numbers
filled in under Roster as well. I tried a IF() but there is no ELSE
statement so I kinda got stuck.

I have zero programming exp with OO so I was hoping there would be
someone else with experience.

Share: 

 

6 Answers Found

 
Answer #1    Answered On: Jan 03    

The ELSE is built in. The format for the functions is

IF(test;action_on_true;action_on_false)

If you need more levels, you need to nest IF()s, I'm afraid - there is
no multiple ELSE or CASE support in OOo.

 
Answer #2    Answered On: Jan 03    

I am not sure how you are planning on doing this but the IF Statement
does contain the Else portion of the test.

IF

Specifies a logical test to be performed. This is from Star Office
but OO is the same in this command structure. It is just called
Otherwise instead of Else.

 
Answer #3    Answered On: Jan 03    

Let me explain what I have already done and what I want to do.

Sheet1 C5 is the HOME field.
Sheet1 E5 is the VISITOR field.
In C5 and E5 the games coordinator types in a number that references a team.

Sheet1 C12 is HOME team name.
This is automatically set when I type in the number in C5;
=vlookup(C5;$Sheet3.A17:B23;2;0)

Sheet3 A17 through A23 is 1 - 7 (the number of teams we have this
season) and B17 through B23 is the team name.

In B15 is the first player jersey number.
In C15 is the first player name.

Sheet7 is the Team Roster
Column A
A1 = 1st Team Name = Red
A2 = First Player
A11 = Last Red Team Player

A13 = 2nd Team Name = Green
A14 = First Player
A23 = Last Green Team Player

What I wanted to happen is, when I type the team number in C&E5 besides
the team name being filled in I want to copy the players and jersey
numbers for all the members.

 
Answer #4    Answered On: Jan 03    

What I would do is set up the players as a table, each team on a
separate row. You then set the first element of the row equal to the
team number (so you have A1 = 1, A2 = Team 1, player 1, A3 = Team 1,
player 1 jersey number, A4 = Team 1, player 2... and so on). You then
use Vlookup to extract that information from the table, using the team
number as the reference to get the correct row. A bit of a dirty hack,
I'm afraid, but I have yet to find another way of doing it without
getting into macros.

 
Answer #5    Answered On: Jan 03    

It would be easier for us to help you if you posted the file in the
group file section and then we could see exactly what you mean. We could
then upload our variant for you and you could make your choice... ubuntu
is all about choice!

 
Answer #6    Answered On: Jan 03    

I just posted the file to the Files section in the Smart folder. Its the
xls file.

 
Didn't find what you were looking for? Find more on OO vlookup and if Or get search suggestion and latest updates.




Tagged: