Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Andy
 
Posts: n/a
Default If Then Lookups - If Someone helps me, Then I will be happier!!!!

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof multi-use.
I've had a similiar formula that did a SumIf from the same table, but now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=index(c1:c1000,match(true,((a:a1000="Sink")*(b1:b 1000="new york")),0))
array entered (ctrl+shift+enter)

where column C =Total Sold, Col B = Location and Column A = Product


"Andy" wrote in message
...
Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof multi-use.
I've had a similiar formula that did a SumIf from the same table, but now
I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

Try:

=SUMPRODUCT(--(PRODUCT="Sink"),--(Location="New York"),Sold)


"Andy" wrote:

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof multi-use.
I've had a similiar formula that did a SumIf from the same table, but now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)

  #4   Report Post  
Andy
 
Posts: n/a
Default

Duke,
I'm keeping you busy this morning. This formula works well for summing, but
I don't want to sum, just return the value in that cell. So the value I'm
looking for in this case is B. The value of the cell in the Total range.
Not the sum, but the actual value in the matching cell.

Sorry if the explanation is confusing.
Andy



"Duke Carey" wrote:

Try:

=SUMPRODUCT(--(PRODUCT="Sink"),--(Location="New York"),Sold)


"Andy" wrote:

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof multi-use.
I've had a similiar formula that did a SumIf from the same table, but now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)

  #5   Report Post  
Duke Carey
 
Posts: n/a
Default

Yes, it sums, Andy. However, since you said there is only one entry that
matches your two criteria, the formula will sum a single cell. Hence, you
should get nothing more nor nothing less than the value you need.

If you aren't correct in your assertion that there will always be only one
matching row, then...that's another story.

"Andy" wrote:

Duke,
I'm keeping you busy this morning. This formula works well for summing, but
I don't want to sum, just return the value in that cell. So the value I'm
looking for in this case is B. The value of the cell in the Total range.
Not the sum, but the actual value in the matching cell.

Sorry if the explanation is confusing.
Andy



"Duke Carey" wrote:

Try:

=SUMPRODUCT(--(PRODUCT="Sink"),--(Location="New York"),Sold)


"Andy" wrote:

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof multi-use.
I've had a similiar formula that did a SumIf from the same table, but now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)



  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

If they combination is unique as you say, it will only sum the single value.
QED.

--
HTH

Bob Phillips

"Andy" wrote in message
...
Duke,
I'm keeping you busy this morning. This formula works well for summing,

but
I don't want to sum, just return the value in that cell. So the value I'm
looking for in this case is B. The value of the cell in the Total range.
Not the sum, but the actual value in the matching cell.

Sorry if the explanation is confusing.
Andy



"Duke Carey" wrote:

Try:

=SUMPRODUCT(--(PRODUCT="Sink"),--(Location="New York"),Sold)


"Andy" wrote:

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof

multi-use.
I've had a similiar formula that did a SumIf from the same table, but

now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should

only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)



  #7   Report Post  
Andy
 
Posts: n/a
Default

The combinations should be unique.

However, the values are not numbers. They can be text at times. Actually,
more often than not, they are text. It's more like a vlookup than a
conditional sum. Any ideas?

Thanks,
Andrea


"Bob Phillips" wrote:

If they combination is unique as you say, it will only sum the single value.
QED.

--
HTH

Bob Phillips

"Andy" wrote in message
...
Duke,
I'm keeping you busy this morning. This formula works well for summing,

but
I don't want to sum, just return the value in that cell. So the value I'm
looking for in this case is B. The value of the cell in the Total range.
Not the sum, but the actual value in the matching cell.

Sorry if the explanation is confusing.
Andy



"Duke Carey" wrote:

Try:

=SUMPRODUCT(--(PRODUCT="Sink"),--(Location="New York"),Sold)


"Andy" wrote:

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof

multi-use.
I've had a similiar formula that did a SumIf from the same table, but

now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should

only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)




  #8   Report Post  
Duke Carey
 
Posts: n/a
Default

If that's the case, then insert a new column to the left of your table and,
in that column, concatenate the two Product & Location data, with something
like

=A2&B2

Then, the lookup will use the entire range, including the new column, and
you'd use

=VLOOKUP("SinkNewYork",table_range,col#,false)


"Andy" wrote:

The combinations should be unique.

However, the values are not numbers. They can be text at times. Actually,
more often than not, they are text. It's more like a vlookup than a
conditional sum. Any ideas?

Thanks,
Andrea


"Bob Phillips" wrote:

If they combination is unique as you say, it will only sum the single value.
QED.

--
HTH

Bob Phillips

"Andy" wrote in message
...
Duke,
I'm keeping you busy this morning. This formula works well for summing,

but
I don't want to sum, just return the value in that cell. So the value I'm
looking for in this case is B. The value of the cell in the Total range.
Not the sum, but the actual value in the matching cell.

Sorry if the explanation is confusing.
Andy



"Duke Carey" wrote:

Try:

=SUMPRODUCT(--(PRODUCT="Sink"),--(Location="New York"),Sold)


"Andy" wrote:

Okay I'm really stumped here but I know I shouldn't be.

I'm trying to return a value from a table. The table is sortof

multi-use.
I've had a similiar formula that did a SumIf from the same table, but

now I
just want to return the value of a certain cell given two conditions.

How do I return the value in column Sold for the following conditions:
Product = Sink
Location = New York

A vLookup wouldn't work because of multiple conditions. There should

only
be one entry with those matching criterias.

Named Ranges are the columns based on their headers.

Product Location Total Sold InStock Percentage
Toaster New York 4 2 2 50%
Oven Philly 17 0 17 100%
Toaster New York 10 2 8 80%
Micro Pittsburgh 10 5 5 50%
Micro Toledo 5 0 5 100%
Sink New York B
Toaster Philly 4 1 3 75%
Toaster Philly 87 15 72 83%
Oven Pittsburgh 9 8 1 11%
Sink Toledo 10 5 5 50%
Toaster Philly A
Toaster Toledo A

BTW This newsgroup is awesome - it's helped me so much in the past few
weeks! (And the boss thinks it's all me!!!)




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
Is there a template that helps to manage condo association budget? Greg Excel Worksheet Functions 3 April 3rd 23 04:27 PM
External lookups won't load Paul Zipko Excel Discussion (Misc queries) 2 June 24th 05 10:23 PM
LOOKUPS - Creating LOOKUPs where two different values must BOTH be satisfied. Mr Wiffy Excel Worksheet Functions 2 May 16th 05 04:29 AM
How about IRS tax preparation form that helps prepare refunds. Krini27 Charts and Charting in Excel 0 February 16th 05 04:19 PM
lookups referring to formulas Excel GuRu Excel Discussion (Misc queries) 5 January 5th 05 03:55 PM


All times are GMT +1. The time now is 02:39 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"