Solved

Lookup on 3 conditions

Posted on 2014-01-27
7
215 Views
Last Modified: 2014-01-27
Hi all,

Enclosed you will find a woorkbook that contains a table that holds a value given 3 conditons.

In collumn A: Date
In collumn B: Period
and in Row 1: Currency

Could you pls provide me with a lookup-function that returns the value for any given set of conditions?

Thank you :)
Lookup-on-3-conditions.xlsx
0
Comment
Question by:Utredning
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 33

Expert Comment

by:Rob Henson
ID: 39811427
Add headers to columns A & B for Date and Period and the same headers above your criteria cells, then you can use:

=DGET(A1:G11,E16,F15:G16)

Where A1:G11 is table including new headers as described above, E16 is cell containing Currency and F15:G16 contains headers the same as Date and period columns and the date and period criteria.

Thanks
Rob H
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 300 total points
ID: 39811437
See attacheed screen shot with additions as suggested above.
Screen-Shot.png
0
 
LVL 8

Assisted Solution

by:Naresh Patel
Naresh Patel earned 200 total points
ID: 39811438
Hi Utredning,


copy past this formula & click to fx bar & then all keys to gather ctrl+shift+enter.
=INDEX(A1:G11,MATCH(F16&G16,A1:A11&B1:B11,0),MATCH(E16,A1:G1,0))

Open in new window


Thanks
0
Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

 
LVL 8

Expert Comment

by:Naresh Patel
ID: 39811446
I guess
=DGET(A1:G11,E16,F15:G16)

Open in new window

much suitable then complex array formula. thanks Mr. Rob H  this is adding some thing new in my knowledge. :)
=INDEX(A1:G11,MATCH(F16&G16,A1:A11&B1:B11,0),MATCH(E16,A1:G1,0))

Open in new window

0
 

Author Closing Comment

by:Utredning
ID: 39811452
Thanks alot!
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 39811459
DGET only works because of the format of the data.

If multiple entries match the criteria specified then formula will give an error, whereas I believe INDEX will return first entry that matches.

For purpose of clarification for  both, syntax of DGET (and other Dfunction) formula:

=DGET(Database,Field,Criteria)

In this instance, the currency happens to be a Field header so can be used to determine the column but needed the other headers added to identify fields or combinations thereof.

Thanks
Rob H
0
 
LVL 8

Expert Comment

by:Naresh Patel
ID: 39811474
Thanks for explanation.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question