Help me 1

T

TIMOTHY

I want to autofilter a range using vba, which is the right way, after
making it a table or range is enough
 
H

Howard

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top