Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would love to have a macro do the following.
I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What do you mean by "show"? I assume they are already showing.
-- Vasant "PCOR" wrote in message et.cable.rogers.com... I would love to have a macro do the following. I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a number of col and rows. Every row of every col does not necessarily
contain data Example: A B C D 1 12 9 45 2 3 54 3 22 78 4 112 5 100 14 6 25 65 Using the example above: If I placed my cursor at A1 and click a button I want to see only rows1,2,5 If I was to press the button again(with the cursor at A1), then I would see the entire col again. I would like this process to continue as I add more data to col E,F etc Thanks in advance "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... What do you mean by "show"? I assume they are already showing. -- Vasant "PCOR" wrote in message et.cable.rogers.com... I would love to have a macro do the following. I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Data | Filter | AutoFilter
should do what you want. Not sure what this has to do with a macro writing a macro! :) -- Vasant "PCOR" wrote in message et.cable.rogers.com... I have a number of col and rows. Every row of every col does not necessarily contain data Example: A B C D 1 12 9 45 2 3 54 3 22 78 4 112 5 100 14 6 25 65 Using the example above: If I placed my cursor at A1 and click a button I want to see only rows1,2,5 If I was to press the button again(with the cursor at A1), then I would see the entire col again. I would like this process to continue as I add more data to col E,F etc Thanks in advance "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... What do you mean by "show"? I assume they are already showing. -- Vasant "PCOR" wrote in message et.cable.rogers.com... I would love to have a macro do the following. I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Intersect(Cells.SpecialCells(xlCellTypeBlanks),
ActiveCell.EntireColumn).EntireRow.Hidden = True -- Rob van Gelder - http://www.vangelder.co.nz/excel "PCOR" wrote in message et.cable.rogers.com... I have a number of col and rows. Every row of every col does not necessarily contain data Example: A B C D 1 12 9 45 2 3 54 3 22 78 4 112 5 100 14 6 25 65 Using the example above: If I placed my cursor at A1 and click a button I want to see only rows1,2,5 If I was to press the button again(with the cursor at A1), then I would see the entire col again. I would like this process to continue as I add more data to col E,F etc Thanks in advance "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... What do you mean by "show"? I assume they are already showing. -- Vasant "PCOR" wrote in message et.cable.rogers.com... I would love to have a macro do the following. I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this seems to work:
Private Sub CommandButton1_Click() call filterxxx (1) End Sub Private Function filterxxx(i As Integer) Application.ScreenUpdating = False If ActiveSheet.AutoFilterMode = False Then Range("DATABASE").Select With Selection .AutoFilter Field:=i, Criteria1:="<" End With Else ActiveSheet.AutoFilterMode = False End If Application.ScreenUpdating = True End Function this is assuming that the table of numbers is a named range called "DATABASE". The code for commandbutton1 will filter column 1 of DATABASE.You could add another commandbutton at the top of column 2 and simply have: Private Sub CommandButton2_Click() call filterxxx (2) End Sub it should call the function but will filter using column2 Hope this is some help Jason "PCOR" wrote in message . net.cable.rogers.com... I have a number of col and rows. Every row of every col does not necessarily contain data Example: A B C D 1 12 9 45 2 3 54 3 22 78 4 112 5 100 14 6 25 65 Using the example above: If I placed my cursor at A1 and click a button I want to see only rows1,2,5 If I was to press the button again(with the cursor at A1), then I would see the entire col again. I would like this process to continue as I add more data to col E,F etc Thanks in advance "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... What do you mean by "show"? I assume they are already showing. -- Vasant "PCOR" wrote in message et.cable.rogers.com... I would love to have a macro do the following. I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the efort Jason
How would you chnage this code to NOT have to name the col "DATABASE" but to refer to the SELECTED COL Thanks "jason" wrote in message om... this seems to work: Private Sub CommandButton1_Click() call filterxxx (1) End Sub Private Function filterxxx(i As Integer) Application.ScreenUpdating = False If ActiveSheet.AutoFilterMode = False Then Range("DATABASE").Select With Selection .AutoFilter Field:=i, Criteria1:="<" End With Else ActiveSheet.AutoFilterMode = False End If Application.ScreenUpdating = True End Function this is assuming that the table of numbers is a named range called "DATABASE". The code for commandbutton1 will filter column 1 of DATABASE.You could add another commandbutton at the top of column 2 and simply have: Private Sub CommandButton2_Click() call filterxxx (2) End Sub it should call the function but will filter using column2 Hope this is some help Jason "PCOR" wrote in message . net.cable.rogers.com... I have a number of col and rows. Every row of every col does not necessarily contain data Example: A B C D 1 12 9 45 2 3 54 3 22 78 4 112 5 100 14 6 25 65 Using the example above: If I placed my cursor at A1 and click a button I want to see only rows1,2,5 If I was to press the button again(with the cursor at A1), then I would see the entire col again. I would like this process to continue as I add more data to col E,F etc Thanks in advance "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... What do you mean by "show"? I assume they are already showing. -- Vasant "PCOR" wrote in message et.cable.rogers.com... I would love to have a macro do the following. I would place my cursor at the top of a col and then press a button. Pressing that button would do one of two things. Show all the non blank entries in that col or if the non entries were showiong,would show all the entries in the selected col. Can this be done I would appreciate lots of help. Thanks -- Norton Professional 2004 says this email is clean...believe it |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Macor | New Users to Excel | |||
Macor | Excel Discussion (Misc queries) | |||
How to create a macor to count the usage of another macor | Excel Discussion (Misc queries) | |||
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? | Excel Worksheet Functions | |||
end sub in If then macor | Excel Programming |