#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Help me 1

I want to autofilter a range using vba, which is the right way, after
making it a table or range is enough
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default Help me 1

On Thursday, September 13, 2012 9:40:41 PM UTC-7, TIMOTHY wrote:
I want to autofilter a range using vba, which is the right way, after

making it a table or range is enough


Hi Timothy,

Here's one of many ways. Probably need a fair amount of tweaking to suit your exact needs.

Option Explicit
Sub FillRng()
Dim i As String
Dim c As Range
i = "A Choice"

' i could be an item from a drop down list
' If so then i = range("A1").value (drop down in A1)
For Each c In Range("E2:G10")
If c.Value = "" Then c.Value = i
Next

End Sub

HTH
Regards,
Howard
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"