Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default expanding SUMPRODUCT

I am using Excel 2003 and Visual Basic 6.5.

I have a table of London Underground stations

Part of that table is
A R S T U V W X Y Z AA AB AC
1 Station ... Bak Cen Cir Dis Ham Jub Met Nor Ove Pic Vic Wat
....
3 Acton Town ... 3 26
....
21 Barons Court ... 12 28

3, 12, 26, and 28 allow me to order stations topologically within a
line.
I hope I show that Action Town and Barons Court are connected by 2
lines, Dis(trict) and Pic(cadilly).
I can generate that 2 with

Evaluate("=sumproduct((R" & 3 & ":AC" & 3 & "<0)*(R" & 21 & ":AC" & 21 & "<0))")

[I avoid at number of double quote characters in that formula by using
the Excel 'identity' 0 = "". i.e. I use "< 0" in preference to "<
"""""]
I can quickly tell if there is more than one line connecting a given
pair of stations - the result of that formula is more than one.

I want to know for a given pair of stations known to be linked by more
than one line, what are the linking lines.
I think I would like a formula to produce the array
Bak Cen Cir Dis Ham Jub Met Nor Ove Pic Vic Wat
{"", "", "", "Dis", "", "", "", "", "", "Pic", "", ""}

and I would also like a formula to produce the array
{"Dis", "Pic"}

Obviously, I can find the matches by looping through row 3 or row 21 or
otherwise.

I would appreciate something more clever with looping "inside" Excel.
--
Walter Briscoe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default expanding SUMPRODUCT

On May 7, 2:33*pm, Walter Briscoe wrote:
I am using Excel 2003 and Visual Basic 6.5.

I have a table of London Underground stations

Part of that table is
* *A * * * * * * * *R * S * T * U * V * W * X * Y * Z * AA *AB *AC
*1 Station * * *... Bak Cen Cir Dis Ham Jub Met Nor Ove Pic Vic Wat
...
*3 Acton Town * ... * * * * * * * 3 * * * * * * * * * * *26
...
21 Barons Court ... * * * * * * *12 * * * * * * * * * * *28

3, 12, 26, and 28 allow me to order stations topologically within a
line.
I hope I show that Action Town and Barons Court are connected by 2
lines, Dis(trict) and Pic(cadilly).
I can generate that 2 with

Evaluate("=sumproduct((R" & 3 & ":AC" & 3 & "<0)*(R" & 21 & ":AC" & 21 & "<0))")

[I avoid at number of double quote characters in that formula by using
the Excel 'identity' 0 = "". i.e. I use "< 0" in preference to "<
"""""]
I can quickly tell if there is more than one line connecting a given
pair of stations - the result of that formula is more than one.

I want to know for a given pair of stations known to be linked by more
than one line, what are the linking lines.
I think I would like a formula to produce the array
*Bak Cen Cir Dis * *Ham Jub Met Nor Ove Pic * *Vic Wat
{"", "", "", "Dis", "", "", "", "", "", "Pic", "", ""}

and I would also like a formula to produce the array
{"Dis", "Pic"}

Obviously, I can find the matches by looping through row 3 or row 21 or
otherwise.

I would appreciate something more clever with looping "inside" Excel.
--
Walter Briscoe


Hard to tell without seeing the project.
"If desired, send your file to dguillett1 @gmail.com I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."


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
Expanding Text Box Marc Excel Discussion (Misc queries) 1 March 25th 08 04:52 PM
expanding numbers? Pendal Excel Worksheet Functions 5 December 22nd 07 07:45 PM
expanding IF D[_5_] Excel Programming 1 May 7th 04 12:48 PM
Expanding Code Phil Hageman[_3_] Excel Programming 2 December 20th 03 06:08 PM
Expanding Code Bob Phillips[_6_] Excel Programming 0 December 20th 03 06:07 PM


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