Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic Arrays and Formulae


Anyone? Still pulling my hair out here.

Cheer

--
Josep

-----------------------------------------------------------------------
Joseph's Profile: http://www.excelforum.com/member.php...nfo&userid=563
View this thread: http://www.excelforum.com/showthread.php?threadid=31387

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Dynamic Arrays and Formulae

Joseph,

Try this one:

Sub SumWorkbooks()
Dim MyCell As Range
Dim wb As Workbook
Dim MyFormula As String
Set MyCell = ThisWorkbook.Sheets("Reports").Range("B2")

For Each wb In Workbooks
If wb.Name < ThisWorkbook.Name Then
MyFormula = MyFormula & "'" & wb.Name & "'" & "!R2C2" & ","
End If
Next wb
MyCell.FormulaR1C1 = "=SUM(" & Left(MyFormula, Len(MyFormula) - 1) & ")"
End Sub

Regards,
KL

"Joseph" wrote in message
...

Anyone? Still pulling my hair out here.

Cheers


--
Joseph


------------------------------------------------------------------------
Joseph's Profile:
http://www.excelforum.com/member.php...fo&userid=5637
View this thread: http://www.excelforum.com/showthread...hreadid=313874



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
Dynamic Arrays chaz Excel Discussion (Misc queries) 1 May 23rd 06 12:43 AM
Dynamic arrays Driver New Users to Excel 3 November 7th 05 10:11 PM
Dynamic Arrays Chiba Excel Worksheet Functions 2 July 9th 05 03:58 AM
Dynamic Arrays and Formulae Joseph[_50_] Excel Programming 0 November 16th 04 04:50 PM
dynamic arrays in excel Koos Excel Programming 2 January 10th 04 02:30 PM


All times are GMT +1. The time now is 09:05 AM.

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"