Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7902263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:26:56+00:00 2026-06-03T09:26:56+00:00

This is a continuation of the question excel different SUM.IF array function , But

  • 0

This is a continuation of the question excel different SUM.IF array function, But since I’ve marked that as solved, I created a new question.

What I wanted there was a distinct sum of some values, and I have implemented @Marc’s solution. However the report requirements have changed. I now need to exclude all values that are hidden, but still keep the original calculation method. Basicly i want to add a feature in the same way a SUBTOTAL(109, ref) would work.

To this I’ve created a simple VBA function CellIsNotHidden(Range), which returns 0 or 1 depending on the cell.

Therefore my best guess would be a formula like: {=SUM(IF($B1:$B7<>$B2:$B8,D2:D8,0)*CellIsNotHidden(D2:D8))}

But this function doesn’t work, because CellIsNotHidden is not an array function.

How can I solve this?

In advance, thanks

Gunnar

Edit:

Thought I should include the simple VBA function:

  Function CellIsNotHidden(InputRange As Range)

  If InputRange.Cells.Height = 0 Then
      CellIsNotHidden = 0
  Else
      If InputRange.Cells.Width = 0 Then
          CellIsNotHidden = 0
      Else
          CellIsNotHidden = 1
      End If
  End If

  End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:26:57+00:00Added an answer on June 3, 2026 at 9:26 am

    Try this for UDF CellIsNotHidden. This will handle 1d (vector) and 2d arrays. Tested:

    Function CellIsNotHidden(MyRange As Range) As Variant
      Dim RootCell As Range
      Dim tmpResult() As Long
      Dim i As Long
      Dim j As Long
    
    On Error GoTo Whoops
      ReDim tmpResult(0 To MyRange.Rows.Count - 1, 0 To MyRange.Columns.Count - 1)
      Set RootCell = MyRange.Cells(1, 1)
      For j = 0 To MyRange.Columns.Count - 1
        For i = 0 To MyRange.Rows.Count - 1
          tmpResult(i, j) = Not (RootCell.Offset(i, j).EntireColumn.hidden Or RootCell.Offset(i, j).EntireRow.hidden)
        Next i
      Next j
      CellIsNotHidden = tmpResult
    On Error GoTo 0
      Exit Function
    Whoops:
      Debug.Print Err & " " & Error
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is in continuation to my previous post located here . Since there
A continuation from this question I need a SQL statement that returns the number
In a continuation from this question . I'm trying to bind a given function
This question is a continuation of this one but asking for a more specific
This is a continuation from the previous stackoverflow jQuery question I asked, but I
This is a continuation of the this question. I am new to network programming,
This is a continuation question from a previous question I have asked I now
This is a continuation of my question about reading the superblock . Let's say
This is in continuation with the question posted here: Finding the center of mass
This is a continuation of this question: Original Question (SO) The answer to this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.