OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Linking combo box to spreadsheet cell

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
0x00x0
Newbie
Newbie


Joined: 22 Apr 2007
Posts: 4

PostPosted: Sun Apr 22, 2007 10:48 am    Post subject: Linking combo box to spreadsheet cell Reply with quote

I'm trying to link the selected index of a combo box (drop down menu) to a specific cell. Something along these lines:
IF(comboBox.selection=1)
C2=$1200;
ELSE C2=$1000

is there a way to reference a combo box in Calc in an IF statement, or perhaps there is a better way.
Thanks in advance for your help.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Sun Apr 22, 2007 11:14 am    Post subject: Reply with quote

Link your combobox to one cell and use a formula in another one:
=IF(linkedCell;1200;1000) or =1000+linkedCell*200
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
0x00x0
Newbie
Newbie


Joined: 22 Apr 2007
Posts: 4

PostPosted: Sun Apr 22, 2007 11:36 am    Post subject: Reply with quote

Villeroy,
Thanks for the quick reply. Your idea is very good, can an IF statement evaluate strings as true or false. for example, can I: =IF(F2="Shop";80;140) ?
If not, is there a way to make my combo box whose contents are "Shop, OnSite, Remote and Phone" evaluate boolean? Thanks again for your help.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Sun Apr 22, 2007 11:40 am    Post subject: Reply with quote

Simply try. Your formula looks good.
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
0x00x0
Newbie
Newbie


Joined: 22 Apr 2007
Posts: 4

PostPosted: Sun Apr 22, 2007 1:20 pm    Post subject: Reply with quote

Hey thanks again, that worked perfectly. I really appreciate it.
I'm getting quite a bit ahead of myself here, but is it possible to populate a combo box with a column on another spreadsheet? I don't really need to know how yet, just trying to develop a solution here for the long run. Thanks again.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Mon Apr 23, 2007 11:40 am    Post subject: Reply with quote

You can set a source-range like A1:A10 or Sheet2.A1:A10. Have a look in the dialogue where you defined the linked cell.
Then you may give a try with Menu:Data>Validity...Type:"Range" or "List". This will turn a cell itself into a listbox.
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
0x00x0
Newbie
Newbie


Joined: 22 Apr 2007
Posts: 4

PostPosted: Mon Apr 23, 2007 12:01 pm    Post subject: Reply with quote

Thank you very much, that is exactly the solution I'm looking for.
I very much appreciate your help, thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group