Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,344
Default Lookup based on criteria in 2 columns

Hi,

In the following examples my data only goes down to row 7 but you just need
to adjust the formula for your range.

You can array enter the following formula:

=INDEX(C2:C7,MATCH(E1&F1,A2:A7&B2:B7,0),)

If you enter the Location in E1 and the date in F1. To array enter it you
press Shift+Ctrl+Enter rather than enter.

In 2007 you could use

=SUMIFS(C2:C7,A2:A7,E1,B2:B7,F1)

WARNING: If the location is entered as text and not a number in column A
then these two formulas will work but

=SUMPRODUCT(--(A2:A50=102),--(B2:B50=DATE(2008,9,15)),C2:C50)

will return 0. To get it to work in that case change the formula to read

=SUMPRODUCT(--(A2:A50="102"),--(B2:B50=DATE(2008,9,15)),C2:C50)

--
Thanks,
Shane Devenshire


"Mike" wrote:

Hi,
I am trying to use a vlookup or other function to return the value in the
amount column based on the location and date. Here is a sample of my data:

Location Date Amount
101 9/15/8 10
101 9/16/8 20
101 9/17/8 15
102 9/15/8 50
102 9/16/8 75
102 9/17/8 67

For example if I wanted to return the amount for location 102 on 9/15/8,
what formula would I use? I tried using variations of vlookups but had no
luck.

Thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
lookup based on 2 criteria SteveC Excel Worksheet Functions 1 August 7th 08 09:48 PM
Lookup based on two criteria. . . bokonon Excel Discussion (Misc queries) 3 February 2nd 06 07:41 PM
Lookup based on 2 criteria L. S. Martin Excel Worksheet Functions 13 July 16th 05 10:14 PM
Lookup based on two criteria in 1 row BethP Excel Discussion (Misc queries) 3 April 12th 05 06:47 AM
LOOKUP value based on 2 criteria Jaye Excel Worksheet Functions 1 November 22nd 04 11:08 PM


All times are GMT +1. The time now is 06:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"