#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sumif in 3d


I found a VBA solution to SUMIF in 3d however, it returned a Valu
error.
I need to sumif over 200 sheets. How can I do this

--
Beeblebro
-----------------------------------------------------------------------
Beeblebrox's Profile: http://www.excelforum.com/member.php...fo&userid=3734
View this thread: http://www.excelforum.com/showthread.php?threadid=57163

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sumif in 3d

that might be an indication that it wasn't actually a solution.

Without knowing what your solution was, it would be hard to say.

--
Regards,
Tom Ogilvy

"Beeblebrox" wrote
in message ...

I found a VBA solution to SUMIF in 3d however, it returned a Value
error.
I need to sumif over 200 sheets. How can I do this?


--
Beeblebrox
------------------------------------------------------------------------
Beeblebrox's Profile:
http://www.excelforum.com/member.php...o&userid=37348
View this thread: http://www.excelforum.com/showthread...hreadid=571630



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumif in 3d

I'd check the data in each of those sheets, too.

Maybe you have a cell that evaluates to #value! in one of those sheets.

But it could be the code, too. If there are unhandled errors, you could see
that result, too.

Beeblebrox wrote:

I found a VBA solution to SUMIF in 3d however, it returned a Value
error.
I need to sumif over 200 sheets. How can I do this?

--
Beeblebrox
------------------------------------------------------------------------
Beeblebrox's Profile: http://www.excelforum.com/member.php...o&userid=37348
View this thread: http://www.excelforum.com/showthread...hreadid=571630


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sumif in 3d


Here's the coding I used. I'm testing conditions that are the text
results of a lookup and summing cells that are numerical results of
nested IF statements and a lookup). But I also tried it with replacing
the text lookup with straight text and the If formulas with numbers on
only three sheets. Still no luck.



Function SumIf3D(Range3D As String, Criteria As String, Optional
Sum_Range As Variant) As Variant

Dim sTestRange As String
Dim sSumRange As String
Dim Sheet1 As Integer
Dim Sheet2 As Integer
Dim n As Integer
Dim Sum As Double

Application.Volatile

If Parse3DRange(Application.Caller.Parent.Parent.Name , Range3D,
Sheet1, Sheet2, Sheet3, sTestRange) = False Then
SumIf3D = CVErr(xlErrRef)
End If

If IsMissing(Sum_Range) Then
sSumRange = sTestRange
Else
sSumRange = Sum_Range.Address
End If

Sum = 0
For n = Sheet1 To Sheet3
With Worksheets(n)
Sum = Sum +
Application.WorksheetFunction.SumIf(.Range(sTestRa nge), Criteria,
..Range(sSumRange))
End With
Next n
SumIf3D = Sum
End Function


--
Beeblebrox
------------------------------------------------------------------------
Beeblebrox's Profile: http://www.excelforum.com/member.php...o&userid=37348
View this thread: http://www.excelforum.com/showthread...hreadid=571630

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumif in 3d

Did you check your data in each sheet for errors?

Do you have any hidden rows in any of the sheets that could have errors?

If you changed the sheets to a smaller group, did it work ok?

What was the formula you used in the cell?

Beeblebrox wrote:

Here's the coding I used. I'm testing conditions that are the text
results of a lookup and summing cells that are numerical results of
nested IF statements and a lookup). But I also tried it with replacing
the text lookup with straight text and the If formulas with numbers on
only three sheets. Still no luck.

Function SumIf3D(Range3D As String, Criteria As String, Optional
Sum_Range As Variant) As Variant

Dim sTestRange As String
Dim sSumRange As String
Dim Sheet1 As Integer
Dim Sheet2 As Integer
Dim n As Integer
Dim Sum As Double

Application.Volatile

If Parse3DRange(Application.Caller.Parent.Parent.Name , Range3D,
Sheet1, Sheet2, Sheet3, sTestRange) = False Then
SumIf3D = CVErr(xlErrRef)
End If

If IsMissing(Sum_Range) Then
sSumRange = sTestRange
Else
sSumRange = Sum_Range.Address
End If

Sum = 0
For n = Sheet1 To Sheet3
With Worksheets(n)
Sum = Sum +
Application.WorksheetFunction.SumIf(.Range(sTestRa nge), Criteria,
Range(sSumRange))
End With
Next n
SumIf3D = Sum
End Function

--
Beeblebrox
------------------------------------------------------------------------
Beeblebrox's Profile: http://www.excelforum.com/member.php...o&userid=37348
View this thread: http://www.excelforum.com/showthread...hreadid=571630


--

Dave Peterson
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
SUMIF Mike Excel Worksheet Functions 1 August 6th 08 04:53 PM
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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