Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Tricky array problem….


I have a (small) problem which I am unable to solve. Perhaps some bright
wizard has an idea.

I would like to multiply two arrays located in equal sized rows but
invert one first, i.e. if the values a A, B, C and X, Y, Z, I want
AZ+BY+CX.

e.g. if the ranges are 1,2,3 and 1,2,3, my answer should be 10.

My ranges are dynamic so could become much larger than 3 elements.

I tried to invert one of the arrays using the array formula:

=OFFSET(Mult,0,COLUMNS(Mult)-1+(MIN(COLUMN(Mult))-COLUMN(Mult)))

where Mult is the array field (am quite proud of this!!!). If I use F9,
this formula does invert the array. However, as soon as I try to use
this in a larger formula to complete the multiplication, I get #Value!
:

=SUM(OFFSET(Mult,0,COLUMNS(Mult)-1+(MIN(COLUMN(Mult))-COLUMN(Mult)))*CinList)

where CinList is the other array.

Any ideas much appreciated....


--
MarkCCB
------------------------------------------------------------------------
MarkCCB's Profile: http://www.excelforum.com/member.php...o&userid=37148
View this thread: http://www.excelforum.com/showthread...hreadid=568717

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Tricky array problem….

"MarkCCB" skrev i en
meddelelse ...

I have a (small) problem which I am unable to solve. Perhaps some bright
wizard has an idea.

I would like to multiply two arrays located in equal sized rows but
invert one first, i.e. if the values a A, B, C and X, Y, Z, I want
AZ+BY+CX.

e.g. if the ranges are 1,2,3 and 1,2,3, my answer should be 10.

My ranges are dynamic so could become much larger than 3 elements.

I tried to invert one of the arrays using the array formula:

=OFFSET(Mult,0,COLUMNS(Mult)-1+(MIN(COLUMN(Mult))-COLUMN(Mult)))

where Mult is the array field (am quite proud of this!!!). If I use F9,
this formula does invert the array. However, as soon as I try to use
this in a larger formula to complete the multiplication, I get #Value!
:

=SUM(OFFSET(Mult,0,COLUMNS(Mult)-1+(MIN(COLUMN(Mult))-COLUMN(Mult)))*CinList)

where CinList is the other array.

Any ideas much appreciated....


--
MarkCCB



Hi Mark

=SUM(N(OFFSET(Mult,0,COLUMNS(Mult)-1+(MIN(COLUMN(Mult))-COLUMN(Mult))))*CinList)

Will do the trick.

Using the function N() with OFFSET() sometimes works, sometimes doesn't.
(One of the charms one enjoys working with array formulae :-)

In this situation you can skip <Shift<Ctrl<Enter and just use <Enter
by using SUMPRODUCT()

=SUMPRODUCT(N(OFFSET(Mult,0,COLUMNS(Mult)-1+(MIN(COLUMN(Mult))-COLUMN(Mult))))*CinList)


--
Best regards
Leo Heuser

Followup to newsgroup only please.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Tricky array problem….


Leo,
awesome, you are truly a wizard ! It works ! Thankyou so much ! I spent
half a day messing about with this.......
Best regards


--
MarkCCB
------------------------------------------------------------------------
MarkCCB's Profile: http://www.excelforum.com/member.php...o&userid=37148
View this thread: http://www.excelforum.com/showthread...hreadid=568717

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Tricky array problem….

"MarkCCB" skrev i en
meddelelse ...

Leo,
awesome, you are truly a wizard ! It works ! Thankyou so much ! I spent
half a day messing about with this.......
Best regards


--
MarkCCB


You're welcome, Mark, and thanks for the feedback :-)

Leo Heuser


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
Need help with a tricky problem of placing a number within an array... [email protected] Excel Worksheet Functions 2 January 23rd 06 09:36 PM
Where is the bug in my array? Gail Gurman Excel Discussion (Misc queries) 1 January 25th 05 12:36 AM
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 03:58 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"