Is there a way to return a value from a row using two variables from the same
row?

For example

Account# Date Value
1 1/1/00 2
1 1/2/00 2

I'm trying to use vlookup but its not able to differentiate the same account
number but different dates. I want to set a range on cells and have cell
references for the account number and dates and just have the function return
the value. Any help would be appreciated. Thanks!

Re: Returning a value from the same row using two variables by T

T
Thu May 08 22:22:31 CDT 2008

Try one of these:

As long as the combination of account and date are unique:

=SUMPRODUCT(--(Account=A1),--(Date=B1),Value)

Or, this array formula** :

=INDEX(Value,MATCH(1,(Account=A1)*(Date=B1),0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"vanslanzar" <vanslanzar@discussions.microsoft.com> wrote in message
news:03118E63-0B51-4E5F-9C76-EEE27C42EF3C@microsoft.com...
> Is there a way to return a value from a row using two variables from the
> same
> row?
>
> For example
>
> Account# Date Value
> 1 1/1/00 2
> 1 1/2/00 2
>
> I'm trying to use vlookup but its not able to differentiate the same
> account
> number but different dates. I want to set a range on cells and have cell
> references for the account number and dates and just have the function
> return
> the value. Any help would be appreciated. Thanks!