LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Two possible values with a lookup?

I'm not sure if you are still monitoring this thread.

I watch threads I've replied to for about 10 days.

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
I'm not sure if you are still monitoring this thread. If you are, thank
you
very much. Your formula works as needed.



"T. Valko" wrote:

Try this:

This data in the range A1:H1
74019,74019,39008,39008,69861,74831,74831,74831

This data in the range A4:H4
3/4",3/4",1/2",3/4",1/2",1/2",3/4"

This data in the range A5:H5
1000,5000,600,800,3000,50,300,0

These headers in the range B10:E10
74019,39008,69861,74831

A11 = 3/4"
A12 = 1/2"

Enter this formula in B11:

=SUMPRODUCT(--($A$1:$H$1=B$10),--($A$4:$H$4=$A11),$A$5:$H$5)

Copy across to E11 then down to B12:E12.

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
A zero would be best.

Don

"T. Valko" wrote:

74019 39008 69861 74831
6,000 800 0 300 this line for 3/4"
0 600 3,000 50 this line for 1/2"

If there is no 3/4" or 1/2", I do not want anything done.

Not sure I follow you. Do you mean instead of 0 you want a blank cell?

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
I was trying to cover a few different scenarios with one question.
Your
original answer took care of most. For the complicated one I will
use
hlookup. Here is an example of the complicated one:

74019 74019 39008 39008 69861 74831 74831
74831
row of cells with data for other uses
row of cells with data for other uses
3/4" 3/4" 1/2" 3/4" 1/2" 1/2"
3/4"
empty cell
1,000 5,000 600 800 3,000 50
300
0

In another area of the same sheet I combine information of all like
numbers
from the top row using sum if. The result would be:

74019 39008 69861 74831
6,000 800 0 300 this line for 3/4"
0 600 3,000 50 this line for 1/2"

If there is no 3/4" or 1/2", I do not want anything done.

I would like to use hlookup, but it will only find the first number
and
does
not show if there is a second.

I hope you can understand my ramblings.


"T. Valko" wrote:

You would need a more complicated formula. How would you want the
results
displayed:

98765...result1...result2...result3

Or

98765...result1
..............result2
..............result3

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
Thanks for the help.

What would you do if there were three or more possibilities?
Would
you
just
string if statements along or is there a better way?



"T. Valko" wrote:

If there are *only the 2 possibilities* you can use the lookup
for
the
1st
instance and then something like this for the 2nd:

X1 formula:

=VLOOKUP(98765,A2:D5,2,0)

Y1 formula:

=IF(COUNTIF(A2:A5,98765)=2,IF(X1="R","X","R"),"")

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
Here is what I have:

A B C D
12345 X 9 a
98765 R 3 t
98765 X 4 b
56489 X 7 p

Column B has two options X or R. Through validation and list
I
have
the
ability to choose either X or R in Column B. Some times
Column A
has
multiple combinations of information.

In another area of the sheet I need to have both the X and R
show
up.
If
I
use vlookup the first instance only, is shown.

What can I do?

















 
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
i wish to lookup values in column A, & add adjacent values in colu Browny Excel Discussion (Misc queries) 4 September 26th 08 05:00 PM
Lookup with two lookup values KimC Excel Discussion (Misc queries) 1 September 1st 08 04:05 AM
How do I use LOOKUP to return a range of values, then SUM values? irvine79 Excel Worksheet Functions 5 August 4th 06 01:33 PM
Advanced Lookup (lookup for 2 values) 0-0 Wai Wai ^-^ Excel Worksheet Functions 2 March 30th 06 07:09 PM
How do I lookup and return different values when the lookup value. kg Excel Discussion (Misc queries) 1 January 20th 05 12:53 AM


All times are GMT +1. The time now is 12:54 PM.

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

About Us

"It's about Microsoft Excel"