Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Returning an Array as part of creating a cell formula

I have the following Code that writes a following formula to a cell"

Worksheets("Summary").Range("H18").Formula
"=SUMPRODUCT(SUMIF(INDIRECT(""'""&AllSheets&""'!"" &CELL(""address"",a1)),""0""))"

The above code includes the use of a named range called "AllSheets".
created this named range by listing all sheets in the workbook in
column, selecting them and naming the selection "AllSheets"

I would like to have the code do this or better yet modify, the formul
above to reference a function that returns an array of all sheets i
the workbook.

I am aware of the following code that creates such an array but
cannot get the two to work together:

Dim Arr() As String
Dim I as Integer
Redim Arr(Sheets.Count-1)
For I = 0 To Sheets.Count - 1
Arr(i) = Sheets(I+1).Name
Next I
AllTheSheets = Application.Worksheetfunction.Transpose(Arr)

Can someone help me?

G

--
Message posted from http://www.ExcelForum.com

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
Returning left part of cell before a character Alan Excel Discussion (Misc queries) 6 April 4th 23 02:26 PM
#N/A if cell contents not part of an array MichaelR Excel Discussion (Misc queries) 5 June 28th 08 03:09 AM
Array formula returning the cumulative sum vsoler Excel Worksheet Functions 15 June 15th 07 10:54 PM
Array formula returning terminated employees malik641 Excel Worksheet Functions 4 August 16th 05 03:24 PM
What instead of an array formula part 2 Reg Besseling Excel Discussion (Misc queries) 2 December 10th 04 07:35 AM


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