Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default VBA code to Fill Down in a filtered list only to visible cells.

VBA code to Fill Down in a filtered list only to visible cells.

I am trying to create a macro that will fill down in a column based on a
filtered column in a list. I'm creating a formula in a separate column which
I want to fill down to only the visible cells based on the filtered field.

i.e. I am filtering on Column C to show only values 'X'. Then in Column D, I
want a formula I create in the first record to be duplicated to all of the
visible cells/rows in that column to the bottom of the list.

Any ideas?

Thanks in advance!
Training Goddess
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default VBA code to Fill Down in a filtered list only to visible cells.

"Goddess" i'm in lurve ;)

Sub Demo()

Dim cell As Range
Dim source As Range
Set source = Range("C2:C500")
For Each cell In source.SpecialCells(xlCellTypeVisible)
If cell < "" Then
cell.Offset(, 1).FormulaR1C1 = Range("D2").FormulaR1C1
End If
Next


End Sub

"Training Goddess" wrote:

VBA code to Fill Down in a filtered list only to visible cells.

I am trying to create a macro that will fill down in a column based on a
filtered column in a list. I'm creating a formula in a separate column which
I want to fill down to only the visible cells based on the filtered field.

i.e. I am filtering on Column C to show only values 'X'. Then in Column D, I
want a formula I create in the first record to be duplicated to all of the
visible cells/rows in that column to the bottom of the list.

Any ideas?

Thanks in advance!
Training Goddess

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to Fill Down in a filtered list only to visible cells. Training Goddess Excel Programming 1 February 10th 09 08:27 AM
VBA code to Fill Down in a filtered list only to visible cells. Training Goddess Excel Programming 0 February 10th 09 12:18 AM
VBA code to Fill Down in a filtered list only to visible cells. Training Goddess Excel Programming 0 February 10th 09 12:18 AM
How do I only delete/clear the visible cells in a filtered list? Merv Excel Worksheet Functions 5 March 2nd 07 07:00 PM
Code ignoring filtered (visible) tasks. Finius Eetch Excel Programming 1 December 17th 06 02:55 PM


All times are GMT +1. The time now is 03:45 PM.

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"