#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 142
Default Array Help

Thank you for being there to help us,
Is it possible to have a formula in colmn B that will look at any three
individual cells in the array C1:E3 and match them up to any one row from the
array F1:H11, then display a cancatenation of three like cells from array
F1:H11 in Colmn B?

I hope this example comes through well enough for you.
Thank you,
Luke
A B C D E F G H
1 1 6 3 3 5 9
2 0 0 1 7 4 4
3 100 9 8 5 1 0 0
4 2 1 3
5 6 4 3
6 168 1 6 8
7 1 6 4
8 3 3 4
9 4 4 4
10 950 9 5 0
11 8 8 7

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Array Help

One way ..

Place in B1, normal ENTER will do:
=IF(AND(SUMPRODUCT(--ISNUMBER(MATCH($C$1:$E$3,F1,0))),SUMPRODUCT(--ISNUMBER(MATCH($C$1:$E$3,G1,0))),SUMPRODUCT(--ISNUMBER(MATCH($C$1:$E$3,H1,0)))),(F1&G1&H1)+0,"")

Copy B1 down to return the desired concat results as real numbers. Format
col B as Custom, Type: 000 to retain the appearance with leading zeros if
required. And if you want the concat results as text, just replace this part:
(F1&G1&H1)+0 with: F1&G1&H1 in the expression.

Note that the first line in your sample posted, viz the data in F1:H1, ie:
3,5,9 satisfies the criteria and you'd get the correct result: 359 in B1.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote:
Thank you for being there to help us,
Is it possible to have a formula in colmn B that will look at any three
individual cells in the array C1:E3 and match them up to any one row from the
array F1:H11, then display a cancatenation of three like cells from array
F1:H11 in Colmn B?

I hope this example comes through well enough for you.
Thank you,
Luke
A B C D E F G H
1 1 6 3 3 5 9
2 0 0 1 7 4 4
3 100 9 8 5 1 0 0
4 2 1 3
5 6 4 3
6 168 1 6 8
7 1 6 4
8 3 3 4
9 4 4 4
10 950 9 5 0
11 8 8 7

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 142
Default Array Help

Thank you Max, Worked great! I didn't see the 359 when I built my example.
Fantastic!
Thanks again
Luke

"Max" wrote:

One way ..

Place in B1, normal ENTER will do:
=IF(AND(SUMPRODUCT(--ISNUMBER(MATCH($C$1:$E$3,F1,0))),SUMPRODUCT(--ISNUMBER(MATCH($C$1:$E$3,G1,0))),SUMPRODUCT(--ISNUMBER(MATCH($C$1:$E$3,H1,0)))),(F1&G1&H1)+0,"")

Copy B1 down to return the desired concat results as real numbers. Format
col B as Custom, Type: 000 to retain the appearance with leading zeros if
required. And if you want the concat results as text, just replace this part:
(F1&G1&H1)+0 with: F1&G1&H1 in the expression.

Note that the first line in your sample posted, viz the data in F1:H1, ie:
3,5,9 satisfies the criteria and you'd get the correct result: 359 in B1.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote:
Thank you for being there to help us,
Is it possible to have a formula in colmn B that will look at any three
individual cells in the array C1:E3 and match them up to any one row from the
array F1:H11, then display a cancatenation of three like cells from array
F1:H11 in Colmn B?

I hope this example comes through well enough for you.
Thank you,
Luke
A B C D E F G H
1 1 6 3 3 5 9
2 0 0 1 7 4 4
3 100 9 8 5 1 0 0
4 2 1 3
5 6 4 3
6 168 1 6 8
7 1 6 4
8 3 3 4
9 4 4 4
10 950 9 5 0
11 8 8 7

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Array Help

You're welcome, Luke !
Thanks for the feedback
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote in message
...
Thank you Max, Worked great! I didn't see the 359 when I built my example.
Fantastic!
Thanks again
Luke



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default Array Help

Max,

Good job! This is fascinating. I was once told that MATCH( ) is one dimensional. When I first saw $C$1:$E$3 as an argument in the MATCH( ), I thought two dimensional was happening. Then, when I looked deeper, I realized that the two-dimensional array is actually the lookup_value and not the lookup_array. The lookup_array is a single cell - F1, G1 and H1 respectively. I have never seen anything like this. So, the lookup_value can be an array provided SUMPRODUCT( ) is called, right? A single cell can be the lookup_array in any MATCH( ), right? I tested it and it seemed to be the case. Please enlighten/educate me if you don't mind. We still won't label the MATCH( ) two dimensional. Correct?

A general question on IF( ):

As long as the condition returns a value greater than 0, then it is TRUE, right? It doesn't have to be 1. Please correct me if I am wrong.

I am wondering if another solution would be INDEX(MAX(ROW etc. I may be off.

Enjoy your Monday!

Epinn

"Max" wrote in message ...
You're welcome, Luke !
Thanks for the feedback
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote in message
...
Thank you Max, Worked great! I didn't see the 359 when I built my example.
Fantastic!
Thanks again
Luke






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Array Help

the lookup_value can be an array provided
SUMPRODUCT( ) is called, right?


You can use any function that handles arrays: (array entered)

=OR(ISNUMBER(MATCH(A1:B2,D1:D6,0)))

A single cell can be the lookup_array in any MATCH( ), right?


Yes

We still won't label the MATCH( ) two dimensional. Correct?


Correct. The lookup_array must be a 1 dimensional array.

A general question on IF( ):
As long as the condition returns a value greater than 0,
then it is TRUE, right? It doesn't have to be 1.


It can be ANY NUMBER that is not 0:

A1 = -100

=IF(A1,TRUE)

An empty cell will evaluate as 0. A text entry will return #VALUE!

Biff

"Epinn" wrote in message
...
Max,

Good job! This is fascinating. I was once told that MATCH( ) is one
dimensional. When I first saw $C$1:$E$3 as an argument in the MATCH( ), I
thought two dimensional was happening. Then, when I looked deeper, I
realized that the two-dimensional array is actually the lookup_value and not
the lookup_array. The lookup_array is a single cell - F1, G1 and H1
respectively. I have never seen anything like this. So, the lookup_value
can be an array provided SUMPRODUCT( ) is called, right? A single cell can
be the lookup_array in any MATCH( ), right? I tested it and it seemed to be
the case. Please enlighten/educate me if you don't mind. We still won't
label the MATCH( ) two dimensional. Correct?

A general question on IF( ):

As long as the condition returns a value greater than 0, then it is TRUE,
right? It doesn't have to be 1. Please correct me if I am wrong.

I am wondering if another solution would be INDEX(MAX(ROW etc. I may be
off.

Enjoy your Monday!

Epinn

"Max" wrote in message
...
You're welcome, Luke !
Thanks for the feedback
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote in message
...
Thank you Max, Worked great! I didn't see the 359 when I built my example.
Fantastic!
Thanks again
Luke





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default Array Help

Thanks, Biff. This is precious. I didn't know a negative number returns TRUE. Wouldn't have thought of testing with a negative number.

You won't believe how much I learned about SUMPRODUCT in the last couple of days - to be specific, data type matching. SP is not as forgiving as COUNTIF/SUMIF. I may want to coerce both sides of = or < with &"" to be safe.

In case you want to respond to this, please go to

http://groups.google.ca/group/micros...f092dc 3016cd

I don't want to "hijack" this thread as this is a different subject now.

Thanks again for helping me sort out one-dimensional MATCH( ) etc.

Epinn

"Biff" wrote in message ...
the lookup_value can be an array provided
SUMPRODUCT( ) is called, right?


You can use any function that handles arrays: (array entered)

=OR(ISNUMBER(MATCH(A1:B2,D1:D6,0)))

A single cell can be the lookup_array in any MATCH( ), right?


Yes

We still won't label the MATCH( ) two dimensional. Correct?


Correct. The lookup_array must be a 1 dimensional array.

A general question on IF( ):
As long as the condition returns a value greater than 0,
then it is TRUE, right? It doesn't have to be 1.


It can be ANY NUMBER that is not 0:

A1 = -100

=IF(A1,TRUE)

An empty cell will evaluate as 0. A text entry will return #VALUE!

Biff

"Epinn" wrote in message
...
Max,

Good job! This is fascinating. I was once told that MATCH( ) is one
dimensional. When I first saw $C$1:$E$3 as an argument in the MATCH( ), I
thought two dimensional was happening. Then, when I looked deeper, I
realized that the two-dimensional array is actually the lookup_value and not
the lookup_array. The lookup_array is a single cell - F1, G1 and H1
respectively. I have never seen anything like this. So, the lookup_value
can be an array provided SUMPRODUCT( ) is called, right? A single cell can
be the lookup_array in any MATCH( ), right? I tested it and it seemed to be
the case. Please enlighten/educate me if you don't mind. We still won't
label the MATCH( ) two dimensional. Correct?

A general question on IF( ):

As long as the condition returns a value greater than 0, then it is TRUE,
right? It doesn't have to be 1. Please correct me if I am wrong.

I am wondering if another solution would be INDEX(MAX(ROW etc. I may be
off.

Enjoy your Monday!

Epinn

"Max" wrote in message
...
You're welcome, Luke !
Thanks for the feedback
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote in message
...
Thank you Max, Worked great! I didn't see the 359 when I built my example.
Fantastic!
Thanks again
Luke






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 142
Default Array Help

Hi Max,
I seen some other threads based on this one and was wondering if the first
formula you provided me earlier could be tweaked a bit more.
for example the formula currently looks at $C$1:$E$3 and matches the
corresponding row results in F1:H11 while staying locked into $C$1:$E$3.
Now that I see it can be done, I changed my data so that it is all in the
same colmns (see example below).
Until now I would manually pull out the range $C$1:$E$3 and then I looked
for the results.. you helped me with that.
In colmn "F" I marked the middle row (C2:E2) of the range $C$1:$E$3 with an
"X" and note the "X" at (C10:E10) of $C$9:$E$11 as well as (C17:E17) of
$C$16:$E$18 .
I would like to know if it is possible to have the same formula keep it's
original search until it finds another "X" in colmn "F" then unlock from
$C$1:$E$3 (ie $C1:$E3) then lock onto that new range, in this case it's
$C$9:$E$11, until it finds another "X" and so on.
To be clear, the range that "X" represents would always have three total
rows as in the original thread from yesterday; including the row that
contains the "X", one row above and one row below. As well it would not look
back at previous ranges but once locked into arange it would keep matching on
the current "X" Range until it finds another... I think it's a streatch but I
am always amazed at what you guys can do.
Thanks again for your help,
Luke
A B C D E F
1 1 6 3
2 0 0 1 X
3 9 8 5
4 359 3 5 9
5 7 4 4
6 100 1 0 0
7 2 1 3
8 6 4 3
9 168 1 6 8
10 1 6 4
11 3 3 4
12 4 4 4 X
13 9 5 0
14 8 8 7
15 435 4 3 5
16 5 6 1
17 3 0 5 X
18 1 6 8
19 315 3 1 5
20 4 4 5






"Max" wrote:

You're welcome, Luke !
Thanks for the feedback
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Luke" wrote in message
...
Thank you Max, Worked great! I didn't see the 359 when I built my example.
Fantastic!
Thanks again
Luke




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Array Help

Sorry I'm out here, Luke. For better visibility to other responders, suggest
you re-post your new query afresh. Good luck.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 142
Default Array Help

Thank you Max,
Luke

"Max" wrote:

Sorry I'm out here, Luke. For better visibility to other responders, suggest
you re-post your new query afresh. Good luck.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



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
Display an array of references andy62 Excel Worksheet Functions 1 July 6th 06 03:36 AM
How to multiply all cells in array by factor rhauff Excel Discussion (Misc queries) 2 March 21st 06 03:01 PM
Excel array formulas Les Gordon Excel Discussion (Misc queries) 1 September 3rd 05 04:12 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


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