• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1031
  • Last Modified:

Excel VBA - how do I check if advanced filter is on?

That's my question!  But I'm also curious, is there a resource where you can search for excel vba functions?  Thanks!  
0
JC_Lives
Asked:
JC_Lives
  • 3
  • 2
1 Solution
 
Jeffrey CoachmanCommented:
1. Try this perhaps?

    If ActiveSheet.FilterMode Then
        MsgBox "Filter is off"
    Else
        MsgBox "Filter is on"
    End If

2. "is there a resource where you can search for excel vba functions"
Obviously you can search the Help Files for the Built in Functions.

You can search Google for:  Excel User Defined Functions
To see other functions created for Excel.

Also remember that all and Add-in is, is a collection of user defined functions.
A lot od them provide the source code for free.
So Google: Excel Addin source code
... as well

;-)

JeffCoachman
JeffCoachman
0
 
JC_LivesAuthor Commented:
Great, thanks.  I'm just wondering... I can't even seem to get info on the offset(range,int,int,int,int) function in vba when I type offset into the help box.  I was hoping there is a place that lists all the vba functions, and how they work?
0
 
Jeffrey CoachmanCommented:
"I can't even seem to get info on the offset(range,int,int,int,int) function in vba when I type offset into the help box."
  Meaning you type: Offset Function
...in the search box, and you get *nothing*?

Here is what I get, direct from the Access 2003 help files:
OFFSET  
Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.

Syntax

OFFSET(reference,rows,cols,height,width)

Reference   is the reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.

Rows   is the number of rows, up or down, that you want the upper-left cell to refer to. Using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. Rows can be positive (which means below the starting reference) or negative (which means above the starting reference).

Cols   is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to. Using 5 as the cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. Cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference).

Height   is the height, in number of rows, that you want the returned reference to be. Height must be a positive number.

Width   is the width, in number of columns, that you want the returned reference to be. Width must be a positive number.

Remarks

If rows and cols offset reference over the edge of the worksheet, OFFSET returns the #REF! error value.

If height or width is omitted, it is assumed to be the same height or width as reference.

OFFSET doesn't actually move any cells or change the selection; it just returns a reference. OFFSET can be used with any function expecting a reference argument. For example, the formula SUM(OFFSET(C2,1,2,3,1)) calculates the total value of a 3-row by 1-column range that is 1 row below and 2 columns to the right of cell C2.

Example

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Create a blank workbook or worksheet.
Select the example in the Help topic.
Note  Do not select the row or column headers.



Selecting an example from Help

Press CTRL+C.
In the worksheet, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
   
1
2
3
4

A                                                   B
Formula                                        Description (Result)
=OFFSET(C3,2,3,1,1)                    Displays the value in cell F5 (0)
=SUM(OFFSET(C3:E5,-1,0,3,3))    Sums the range C2:E4 (0)
=OFFSET(C3:E5,0,-3,3,3)              Returns an error, because the reference is not on the worksheet (#REF!)
-----------------------------------------------------------------------------------------------------------


Here is a link that explains the Offset Function.
 http://www.techonthenet.com/excel/formulas/offset.php

Here is the link I use as general reference for ALL the Excel Functions:
http://office.microsoft.com/en-us/excel/HP052042111033.aspx#Database%20functions

;-)

JeffCoachman
0
 
JC_LivesAuthor Commented:
Great, thanks.  That website was exactly what I was looking for... it's funny though, I typed Offset function in excel vba help files and didn't find the offset function explained... but a lot of hits.  Anyway your help was much appreciated.  Take care...
0
 
Jeffrey CoachmanCommented:
;-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now