Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carlyman
 
Posts: n/a
Default Sumproduct - Return a String


When using SUMPRODUCT, is it possible to have the function return a
String instead of only numbers?

Example:
A1:Z1 - Range (1-2) Repeating
A2:Z2 - Alphabet (A-Z)
A3:Z3 - Cell ID (A3, B3, etc)

E1: =SUMPRODUCT(--(1=A1:Z1)*--("A"=A2:Z2)*A3:Z3)

If I do my array math correctly, it should be: {1,0,1,0....,1,0} *
{1,0,0,0,....,0} * {"A3","B3",...."Z3"} = "A3" -- but instead, I
recieve the #VALUE! error.

Any ideas?

Thanks,
JC


--
carlyman
------------------------------------------------------------------------
carlyman's Profile: http://www.excelforum.com/member.php...o&userid=22440
View this thread: http://www.excelforum.com/showthread...hreadid=390411

  #2   Report Post  
KL
 
Posts: n/a
Default

Hi carlyman,

If I do my array math correctly, it should be: {1,0,1,0....,1,0} *
{1,0,0,0,....,0} * {"A3","B3",...."Z3"} = "A3" -- but instead, I
recieve the #VALUE! error.


I am afraid you don't do your math correctly :-) Have you ever seen a text
string, say "A3", to be multiplied by 0 or 1 and return anything, but
errorr?

If I have understood correctly, you could do something like this:

=INDEX(A3:Z3,MATCH("2E",A1:Z1&A2:Z2,0))

This formula has to be array-entered (Ctrl+Shift+Enter)

Regards,
KL


  #3   Report Post  
Govind
 
Posts: n/a
Default

Hi,

Try using

=OFFSET(A1,SUMPRODUCT(--(A1:Z1=1),--(A2:Z2="A"))+1,0)

to return the cell ID.

I presume you have only one combination of 1 in row 1 and "A" in row 2.

Regards

Govind.

carlyman wrote:
When using SUMPRODUCT, is it possible to have the function return a
String instead of only numbers?

Example:
A1:Z1 - Range (1-2) Repeating
A2:Z2 - Alphabet (A-Z)
A3:Z3 - Cell ID (A3, B3, etc)

E1: =SUMPRODUCT(--(1=A1:Z1)*--("A"=A2:Z2)*A3:Z3)

If I do my array math correctly, it should be: {1,0,1,0....,1,0} *
{1,0,0,0,....,0} * {"A3","B3",...."Z3"} = "A3" -- but instead, I
recieve the #VALUE! error.

Any ideas?

Thanks,
JC


  #4   Report Post  
olasa
 
Posts: n/a
Default


Yes, try this:
=INDEX(A3:Z3,1,MATCH(1,(1=A1:Z1)*("A"=A2:Z2),0))

HTH
Ola Sandström


--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=390411

  #5   Report Post  
KL
 
Posts: n/a
Default

Hi Govind,

I don't think your formula can possibly work, as
SUMPRODUCT(--(A1:Z1=1),--(A2:Z2="A"))+1 would always return either 1 or 2
(assuming that the combinations like "1A" are unique in the table), so no
matter what combunation you search you'll get the value of the cell [A2] or
[A3].

Am I missing something?

Regards,
KL


"Govind" wrote in message
...
Hi,

Try using

=OFFSET(A1,SUMPRODUCT(--(A1:Z1=1),--(A2:Z2="A"))+1,0)

to return the cell ID.

I presume you have only one combination of 1 in row 1 and "A" in row 2.

Regards

Govind.

carlyman wrote:
When using SUMPRODUCT, is it possible to have the function return a
String instead of only numbers?

Example: A1:Z1 - Range (1-2) Repeating
A2:Z2 - Alphabet (A-Z)
A3:Z3 - Cell ID (A3, B3, etc)

E1: =SUMPRODUCT(--(1=A1:Z1)*--("A"=A2:Z2)*A3:Z3)

If I do my array math correctly, it should be: {1,0,1,0....,1,0} *
{1,0,0,0,....,0} * {"A3","B3",...."Z3"} = "A3" -- but instead, I
recieve the #VALUE! error.

Any ideas?

Thanks,
JC




  #6   Report Post  
Govind
 
Posts: n/a
Default

Hi KL,

You are right. I stand corrected. Sorry about that.

Govind.

KL wrote:

Hi Govind,

I don't think your formula can possibly work, as
SUMPRODUCT(--(A1:Z1=1),--(A2:Z2="A"))+1 would always return either 1 or 2
(assuming that the combinations like "1A" are unique in the table), so no
matter what combunation you search you'll get the value of the cell [A2] or
[A3].

Am I missing something?

Regards,
KL


"Govind" wrote in message
...

Hi,

Try using

=OFFSET(A1,SUMPRODUCT(--(A1:Z1=1),--(A2:Z2="A"))+1,0)

to return the cell ID.

I presume you have only one combination of 1 in row 1 and "A" in row 2.

Regards

Govind.

carlyman wrote:

When using SUMPRODUCT, is it possible to have the function return a
String instead of only numbers?

Example: A1:Z1 - Range (1-2) Repeating
A2:Z2 - Alphabet (A-Z)
A3:Z3 - Cell ID (A3, B3, etc)

E1: =SUMPRODUCT(--(1=A1:Z1)*--("A"=A2:Z2)*A3:Z3)

If I do my array math correctly, it should be: {1,0,1,0....,1,0} *
{1,0,0,0,....,0} * {"A3","B3",...."Z3"} = "A3" -- but instead, I
recieve the #VALUE! error.

Any ideas?

Thanks,
JC



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
Huge problem with "if" formula's [email protected] Excel Discussion (Misc queries) 16 July 20th 05 07:20 PM
SUMPRODUCT and search string peacelittleone Excel Worksheet Functions 5 June 15th 05 03:24 PM
Return a digit in a string of numbers W M Excel Discussion (Misc queries) 5 May 11th 05 06:51 PM
How to make a cell return the formatted value in a text string (i. n.almeida Excel Worksheet Functions 3 February 2nd 05 01:59 PM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 04:52 AM.

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"