| View previous topic :: View next topic |
| Author |
Message |
elcocoloco General User

Joined: 18 Nov 2007 Posts: 10
|
Posted: Mon Dec 17, 2007 8:38 pm Post subject: DGET's 2 cell argument -- can I use 2 separated cells? |
|
|
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 |
|
 |
elcocoloco General User

Joined: 18 Nov 2007 Posts: 10
|
Posted: Wed Dec 19, 2007 11:32 am Post subject: |
|
|
Wow, I thought this would be an easy question.
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 |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
Posted: Wed Dec 19, 2007 12:29 pm Post subject: |
|
|
| 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 |
|
 |
elcocoloco General User

Joined: 18 Nov 2007 Posts: 10
|
Posted: Wed Dec 19, 2007 12:37 pm Post subject: |
|
|
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 |
|
 |
drking Power User

Joined: 25 Oct 2006 Posts: 91
|
|
| Back to top |
|
 |
|