Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Vlookup w/ AND function

I have a large worksheet and the 1st column is accounts and the 2nd column is
sub accounts, now there are some accounts that are the repeats and some
subaccounts that are repeats, but never in the same row. I know how to search
using the AND function to find the unique account and subaccount combination,
but is there a way to return the value found by this combination? All I am
getting is TRUE. SAVE ME Excel Gods!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup w/ AND function

Is the value to be returned numeric or text or can it be either?

Are you saying that the combination of the account and subaccount are
unique?

Here's a generic method that returns either text or numbers.

Array entered** :

=INDEX(C1:C10,MATCH(1,(A1:A10=account)*(B1:B10=sub account),0))

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

--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
I have a large worksheet and the 1st column is accounts and the 2nd column
is
sub accounts, now there are some accounts that are the repeats and some
subaccounts that are repeats, but never in the same row. I know how to
search
using the AND function to find the unique account and subaccount
combination,
but is there a way to return the value found by this combination? All I am
getting is TRUE. SAVE ME Excel Gods!!!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Vlookup w/ AND function

Biff in this case it is a #, here's an example of what I mean:

Account Subaccount Balance
305000 00-00-000-EQ-00-RS051 #
305000 00-00-000-EQ-00-RS052 #
305500 00-00-000-EQ-00-RS051 #
305500 00-00-000-EQ-00-RS052 #

As you can see there are like acts and subs, but the combo of the 2 are
unique, would you formula work to return the balance (separate column) based
on the combinations?





"T. Valko" wrote:

Is the value to be returned numeric or text or can it be either?

Are you saying that the combination of the account and subaccount are
unique?

Here's a generic method that returns either text or numbers.

Array entered** :

=INDEX(C1:C10,MATCH(1,(A1:A10=account)*(B1:B10=sub account),0))

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

--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
I have a large worksheet and the 1st column is accounts and the 2nd column
is
sub accounts, now there are some accounts that are the repeats and some
subaccounts that are repeats, but never in the same row. I know how to
search
using the AND function to find the unique account and subaccount
combination,
but is there a way to return the value found by this combination? All I am
getting is TRUE. SAVE ME Excel Gods!!!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup w/ AND function

would you formula work to return the balance (separate column)
based on the combinations?


Yes, but this one is "less confusing" :

E1 = some account number
F1 = some subaccount number

=SUMPRODUCT(--(A1:A10=E1),--(B1:B10=F1),C1:C10)


--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
Biff in this case it is a #, here's an example of what I mean:

Account Subaccount Balance
305000 00-00-000-EQ-00-RS051 #
305000 00-00-000-EQ-00-RS052 #
305500 00-00-000-EQ-00-RS051 #
305500 00-00-000-EQ-00-RS052 #

As you can see there are like acts and subs, but the combo of the 2 are
unique, would you formula work to return the balance (separate column)
based
on the combinations?





"T. Valko" wrote:

Is the value to be returned numeric or text or can it be either?

Are you saying that the combination of the account and subaccount are
unique?

Here's a generic method that returns either text or numbers.

Array entered** :

=INDEX(C1:C10,MATCH(1,(A1:A10=account)*(B1:B10=sub account),0))

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

--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
I have a large worksheet and the 1st column is accounts and the 2nd
column
is
sub accounts, now there are some accounts that are the repeats and some
subaccounts that are repeats, but never in the same row. I know how to
search
using the AND function to find the unique account and subaccount
combination,
but is there a way to return the value found by this combination? All I
am
getting is TRUE. SAVE ME Excel Gods!!!






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Vlookup w/ AND function

Biff, that worked great!, got 1 quick question, what is the functionality of
the dashes?? (--)

"T. Valko" wrote:

would you formula work to return the balance (separate column)
based on the combinations?


Yes, but this one is "less confusing" :

E1 = some account number
F1 = some subaccount number

=SUMPRODUCT(--(A1:A10=E1),--(B1:B10=F1),C1:C10)


--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
Biff in this case it is a #, here's an example of what I mean:

Account Subaccount Balance
305000 00-00-000-EQ-00-RS051 #
305000 00-00-000-EQ-00-RS052 #
305500 00-00-000-EQ-00-RS051 #
305500 00-00-000-EQ-00-RS052 #

As you can see there are like acts and subs, but the combo of the 2 are
unique, would you formula work to return the balance (separate column)
based
on the combinations?





"T. Valko" wrote:

Is the value to be returned numeric or text or can it be either?

Are you saying that the combination of the account and subaccount are
unique?

Here's a generic method that returns either text or numbers.

Array entered** :

=INDEX(C1:C10,MATCH(1,(A1:A10=account)*(B1:B10=sub account),0))

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

--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
I have a large worksheet and the 1st column is accounts and the 2nd
column
is
sub accounts, now there are some accounts that are the repeats and some
subaccounts that are repeats, but never in the same row. I know how to
search
using the AND function to find the unique account and subaccount
combination,
but is there a way to return the value found by this combination? All I
am
getting is TRUE. SAVE ME Excel Gods!!!








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup w/ AND function

SUMPRODUCT multiplies arrays of numbers together to get a result.

Each of these expressions will return an array of either TRUE or FALSE:

A1:A10=E1
B1:B10=F1

The double unary minus "--" is used to coerce those TRUE and FALSE to
numbers that SUMPRODUCT can then use to calculate the result. --TRUE gets
coerced to numeric 1 and --FALSE gets coerced to numeric 0.

See this for a comprehensive analysis of SUMPRODUCT:

http://xldynamic.com/source/xld.SUMPRODUCT.html

--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
Biff, that worked great!, got 1 quick question, what is the functionality
of
the dashes?? (--)

"T. Valko" wrote:

would you formula work to return the balance (separate column)
based on the combinations?


Yes, but this one is "less confusing" :

E1 = some account number
F1 = some subaccount number

=SUMPRODUCT(--(A1:A10=E1),--(B1:B10=F1),C1:C10)


--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
Biff in this case it is a #, here's an example of what I mean:

Account Subaccount Balance
305000 00-00-000-EQ-00-RS051 #
305000 00-00-000-EQ-00-RS052 #
305500 00-00-000-EQ-00-RS051 #
305500 00-00-000-EQ-00-RS052 #

As you can see there are like acts and subs, but the combo of the 2 are
unique, would you formula work to return the balance (separate column)
based
on the combinations?





"T. Valko" wrote:

Is the value to be returned numeric or text or can it be either?

Are you saying that the combination of the account and subaccount are
unique?

Here's a generic method that returns either text or numbers.

Array entered** :

=INDEX(C1:C10,MATCH(1,(A1:A10=account)*(B1:B10=sub account),0))

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

--
Biff
Microsoft Excel MVP


"dannyboy8" wrote in message
...
I have a large worksheet and the 1st column is accounts and the 2nd
column
is
sub accounts, now there are some accounts that are the repeats and
some
subaccounts that are repeats, but never in the same row. I know how
to
search
using the AND function to find the unique account and subaccount
combination,
but is there a way to return the value found by this combination?
All I
am
getting is TRUE. SAVE ME Excel Gods!!!








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
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Embedded VLOOKUP function within IF function beautyteknorth Excel Worksheet Functions 6 August 17th 06 09:31 AM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM


All times are GMT +1. The time now is 11:52 PM.

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

About Us

"It's about Microsoft Excel"