| View previous topic :: View next topic |
| Author |
Message |
darren238 General User

Joined: 10 Nov 2011 Posts: 12
|
Posted: Thu Nov 10, 2011 1:15 am Post subject: Applying a filter with a macro |
|
|
Hi guys im trying to apply a filter with a macro, at a click of a button instead of having the user go thru the manual steps.
it has to go through a column (column E) and filter it by the word oversea. thus only showing rows with oversea in column E and hiding the rest.
i've tried searching for it and cant seem to find one that works. any help is much muchhh appreciated. thanks in advance  |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Thu Nov 10, 2011 2:06 am Post subject: |
|
|
Hi,
Go to the top Cell and Select Auto filter from the Data menu. Why should you automate this with a macro?
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
darren238 General User

Joined: 10 Nov 2011 Posts: 12
|
Posted: Thu Nov 10, 2011 2:11 am Post subject: |
|
|
| I'm trying to save the user effort to select filter and then tying in the same criterita every day. most of the users for the program are not exactly IT trained as well. |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Thu Nov 10, 2011 3:12 am Post subject: |
|
|
Hi,
If you create the filter once, you could protect the first row. This way the users always have the filter available, only thing they need to do is select oversea from the menu.
That said why do they need to have all the other in formation if their only requirements is a subset of the data?
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
darren238 General User

Joined: 10 Nov 2011 Posts: 12
|
Posted: Thu Nov 10, 2011 3:56 am Post subject: |
|
|
hi i understand what u mean and if i could have done it that way i would have.
but i have got to follow to the requirements and may it seems stupid it's what must be done. i would appreciate the help. |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu Nov 10, 2011 4:49 am Post subject: |
|
|
Problem is that there are thousands of such "requirements" stated on this forum alone. In fact you can find dozends of sheet filter macros on this forum alone.
Only a small majority of requesters is able to code more than recorded or copied code and we are no human macro recorders nor human google robots.
If you do not want to actually use this software, install Excel, add your own tweaks and stick with that program forever since nothing else will ever meet your "requirements".
This software is more configurable than programmable.
Select your list.
Data>Define... give a name to your list.
Apply any type of filter.
Edit your data, insert rows, delete rows.
Data>Refresh (or some shortcut to that command) restores the previously applied filter and sort settings.
My contingent of free macros for anyone is exhausted. So far I did not get any feedback for the code I wrote this week. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Thu Nov 10, 2011 1:04 pm Post subject: |
|
|
Hi,
| Quote: | | it seems stupid it's what must be done | Support doesn't mean to code whatever the user wants, it's about giving them what they need to do their job most efficiently.
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
martin84 Newbie

Joined: 02 Mar 2012 Posts: 1
|
Posted: Fri Mar 02, 2012 11:32 am Post subject: |
|
|
| It seems to me his request is quite a basic one, How to macro a custom filter. I cannot understand why this is such a big problem. Even coding in Open Office requires the user to know the exact code to do what they want. As this information is not available within the Help function or online I don't see why it can't be supplied here. |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Sun Mar 04, 2012 1:58 am Post subject: |
|
|
Hi,
| Quote: | | Even coding in Open Office requires the user to know the exact code to do what they want. As this information is not available within the Help function or online I don't see why it can't be supplied here. | Because the existing filter solution is flexible and covers a multitude of variations. The request to have it in a macro is static for one specific requirement.
But if you're happy to create a macro, please feel free.
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
|