Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Returning a value from the same row using two variables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vanslanzar - 09 May 2008 04:03 GMT
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!
T. Valko - 09 May 2008 04:22 GMT
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)

Signature

Biff
Microsoft Excel MVP

> Is there a way to return a value from a row using two variables from the
> same
[quoted text clipped - 12 lines]
> return
> the value. Any help would be appreciated. Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.