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

DGET's 2 cell argument -- can I use 2 separated cells?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
elcocoloco
General User
General User


Joined: 18 Nov 2007
Posts: 10

PostPosted: Mon Dec 17, 2007 8:38 pm    Post subject: DGET's 2 cell argument -- can I use 2 separated cells? Reply with quote

I'm using DGET, and for the search criteria argument I need to pass 2 cells. A header and the search criteria, which should both be in the same column with the header right above the criteria. But some of my search criteria are separated from the header. Is there a way to make this function take this argument with 2 cells that are not right on top of each other, but are separated?

Edit: to be clear, when I say "pass 2 cells" I meant "pass 2 cells in 1 argument" ie: for DGET(A1:B4;"Data 1";A10:A11) The 3rd argument (in bold) is the one where I pass 2 cells. I want to separate those. For example, send A10 and A14 in that one argument, instead of A10:A11.


Or do I need to design my sheet in this extremely ugly fashion:

Header
Criterion 1
Header
Criterion 2
Header
Criterion 3

When what I'd actually like is:

Header
Criterion 1
Criterion 2
Criterion 3

Thanks!
Back to top
View user's profile Send private message
elcocoloco
General User
General User


Joined: 18 Nov 2007
Posts: 10

PostPosted: Wed Dec 19, 2007 11:32 am    Post subject: Reply with quote

Wow, I thought this would be an easy question. Sad

Follow up: Is DGET the same in Excel? I don't have Excel, but maybe I could ask on the mrexcel message board.

Thanks.
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8979
Location: Lexinton, Kentucky, USA

PostPosted: Wed Dec 19, 2007 12:29 pm    Post subject: Reply with quote

Have you looked at the example spreadsheet in the Help for DGET? It's at the top of the help page and you can actually copy and paste its data into a test spreadsheet.
Back to top
View user's profile Send private message
elcocoloco
General User
General User


Joined: 18 Nov 2007
Posts: 10

PostPosted: Wed Dec 19, 2007 12:37 pm    Post subject: Reply with quote

Yes, I did. But it uses a criteria set that is only two rows high. So that it's always header on top of criterion.

I want a header, then a bunch of criteria. (And use DGET to the right of each criterion)

Like I said, DGET seems to demand this format for criteria:

Name
John
Name
Tim
Name
Dan

Rather than

Name
John
Tim
Dan

You could use dget on John, by referencing A1:A2. (Assuming my first line starts on A1) But you could never use Dan as a criterion, because it is separated from the header "Name". Like I said, you would have to do this:

Name
John
Name
Tim
Name
Dan

Which is beyond ugly.
Back to top
View user's profile Send private message
drking
Power User
Power User


Joined: 25 Oct 2006
Posts: 91

PostPosted: Tue Jan 01, 2008 11:19 pm    Post subject: Reply with quote

A criteria table does not need headings repeated.

http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_Database_functions

is my effort to explain 'database' functions. I'd be delighted to know if this helps you...
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