home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Excel Macros - Filters

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1283
Discussions: 200,929, Posts: 2,379,145, Members: 246,296
Old September 30th, 2003, 07:47 AM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Sep 2003
Location: London
Posts: 1
Excel Macros - Filters

I've have a tables of targets with the director
responsible for them against each target (1 director per
target), with an autofilter for the table.

On a separate sheet, I've set up macros linked to buttons
labelled with director's names, so when a director clicks
on his/her own name, it goes to the worksheet of targets
and filters the table to show the targets of that director
only. Here's the code:-


Sub CheSha()
'
' CheSha Macro
' Macro recorded 29/09/2003 by Bhupinder Rayat
'

'
Sheets("LDP Template").Select
ActiveSheet.ShowAllData
Selection.AutoFilter Field:=7, Criteria1:="Chetan Shah"
End Sub

I've recorded the macro to show all data first and then
get the required name. The trouble is when the table is
showing all data already, the macro fails because the show
all data command is not available.

Is it possible to insert an if statement within the above
code to say that if all data is showing
then "ActiveSheet.ShowAllData" does not need to be
performed.

Hope I've explained it sufficiently. Can anyone help?

Thanks in advance.

Pinda
Pinda is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2867)
Obama the Muslim (14)
Is the PSU I received dead? (10)
windows vista security holes (9)
HIS HD5770 graphic card question (15)
Print spooler problem (13)
Foreign voltage (10)
Install XP pro and a Vista laptop ?.. (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
Ideal cheap graph card for PC-Gamin.. (16)
New Computer wont recognize XP disc (7)
EVGA 9800 gtx help with finding a g.. (8)
World's largest Monopoly Game using.. (331)
Recent Discussions
solutions for virtical white lines on.. (0)
Ideal cheap graph card for PC-Gaming? (16)
Regular Build (2)
Graphics Card Upgrade Question (0)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Have you switched yet? (84)
Install XP pro and a Vista laptop ?? (10)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)
World's largest Monopoly Game using G.. (331)
Foreign voltage (10)
FiOS modem/router interfering with ne.. (7)
Browsers wont load websites (2)
Virus Doctor Popup? (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (15)


All times are GMT -4. The time now is 03:39 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28