Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 395
Default returning text; alternative to sumproduct/sumif?

I need to check a range and identify each situation where two cells match my
criteria, and in those situations, return the text value of one of those
cells.

My attempts so far which include sumproduct, match, sumif, etc don't seem to
work; sumproduct and sumif seem to want numeric values, match isn't working
because I have to use a wildcard character and the first match is not always
the right one, and I haven't found anything else that will evaluate multiple
cells and return a text value only when both cells meet my criteria.

Are there any other formulas I should play with? I'm reluctant to use array
formulas because this formula will include sumproduct and other formulas, and
my initial testing wasn't fruitful, and I was thinking it might have to do
with entering things like a sumproduct Within an array formula.

=Count(And(criteria1, criteria2))
does provide the expected result (1 match); I just can't figure out how to
tell which column it is in, and return the text from one of my target cells.

I welcome any advice-

Thank you,
Keith
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default returning text; alternative to sumproduct/sumif?

SUMPRODUCT() actually picks the total. If you only have a uniqe record
matching the 2 criterias it works good or otherwise will return the total of
the duplicate records matching both criterias..............Array formula
solution

=INDEX(col3,MATCH(1,(col1=criteria1)*(col2=criteri a2),0))

If this post helps click Yes
---------------
Jacob Skaria


"ker_01" wrote:

I need to check a range and identify each situation where two cells match my
criteria, and in those situations, return the text value of one of those
cells.

My attempts so far which include sumproduct, match, sumif, etc don't seem to
work; sumproduct and sumif seem to want numeric values, match isn't working
because I have to use a wildcard character and the first match is not always
the right one, and I haven't found anything else that will evaluate multiple
cells and return a text value only when both cells meet my criteria.

Are there any other formulas I should play with? I'm reluctant to use array
formulas because this formula will include sumproduct and other formulas, and
my initial testing wasn't fruitful, and I was thinking it might have to do
with entering things like a sumproduct Within an array formula.

=Count(And(criteria1, criteria2))
does provide the expected result (1 match); I just can't figure out how to
tell which column it is in, and return the text from one of my target cells.

I welcome any advice-

Thank you,
Keith

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default returning text; alternative to sumproduct/sumif?

See if this is what you had in mind...

...........A..........B..........C
1........x...........z..........AAA
2........z...........z..........BBB
3........x...........y.........CCC
4........y...........x.........DDD

You want to lookup x in col A and y in col B and return the corresponding
value from col C.

Array entered** :

=INDEX(C1:C4,MATCH(1,(A1:A4="x")*(B1:B4="y"),0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"ker_01" wrote in message
...
I need to check a range and identify each situation where two cells match
my
criteria, and in those situations, return the text value of one of those
cells.

My attempts so far which include sumproduct, match, sumif, etc don't seem
to
work; sumproduct and sumif seem to want numeric values, match isn't
working
because I have to use a wildcard character and the first match is not
always
the right one, and I haven't found anything else that will evaluate
multiple
cells and return a text value only when both cells meet my criteria.

Are there any other formulas I should play with? I'm reluctant to use
array
formulas because this formula will include sumproduct and other formulas,
and
my initial testing wasn't fruitful, and I was thinking it might have to do
with entering things like a sumproduct Within an array formula.

=Count(And(criteria1, criteria2))
does provide the expected result (1 match); I just can't figure out how to
tell which column it is in, and return the text from one of my target
cells.

I welcome any advice-

Thank you,
Keith



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default returning text; alternative to sumproduct/sumif?

Hi,

```````````-
jjhh77

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"ker_01" wrote in message
...
I need to check a range and identify each situation where two cells match
my
criteria, and in those situations, return the text value of one of those
cells.

My attempts so far which include sumproduct, match, sumif, etc don't seem
to
work; sumproduct and sumif seem to want numeric values, match isn't
working
because I have to use a wildcard character and the first match is not
always
the right one, and I haven't found anything else that will evaluate
multiple
cells and return a text value only when both cells meet my criteria.

Are there any other formulas I should play with? I'm reluctant to use
array
formulas because this formula will include sumproduct and other formulas,
and
my initial testing wasn't fruitful, and I was thinking it might have to do
with entering things like a sumproduct Within an array formula.

=Count(And(criteria1, criteria2))
does provide the expected result (1 match); I just can't figure out how to
tell which column it is in, and return the text from one of my target
cells.

I welcome any advice-

Thank you,
Keith


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default returning text; alternative to sumproduct/sumif?

Hi,

Try this

=INDEX(A5:C8,MATCH(1,index((A5:A8="x")*(B5:B8="y") ,,),0),3)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"ker_01" wrote in message
...
I need to check a range and identify each situation where two cells match
my
criteria, and in those situations, return the text value of one of those
cells.

My attempts so far which include sumproduct, match, sumif, etc don't seem
to
work; sumproduct and sumif seem to want numeric values, match isn't
working
because I have to use a wildcard character and the first match is not
always
the right one, and I haven't found anything else that will evaluate
multiple
cells and return a text value only when both cells meet my criteria.

Are there any other formulas I should play with? I'm reluctant to use
array
formulas because this formula will include sumproduct and other formulas,
and
my initial testing wasn't fruitful, and I was thinking it might have to do
with entering things like a sumproduct Within an array formula.

=Count(And(criteria1, criteria2))
does provide the expected result (1 match); I just can't figure out how to
tell which column it is in, and return the text from one of my target
cells.

I welcome any advice-

Thank you,
Keith


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
Sumif or Better Alternative? JeffTO Excel Worksheet Functions 2 July 24th 09 05:46 PM
SUMPRODUCT not returning TEXT value CLR Excel Discussion (Misc queries) 2 May 4th 09 07:55 PM
Returning an alternative value if lookup cannot be found in array Queen_Of_Thebes Excel Discussion (Misc queries) 4 September 2nd 08 01:43 AM
SUMIF Alternative? qflyer Excel Worksheet Functions 2 June 20th 05 07:50 AM
SUMIF Alternative? qflyer Excel Discussion (Misc queries) 1 June 20th 05 06:23 AM


All times are GMT +1. The time now is 08:25 AM.

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"