helpneeded04
New Member
- Joined
- Jun 9, 2015
- Messages
- 9
Hello,
I have a query pulling in data from an external database. In the same worksheet, I have cells equaling cells in the query table. When data in the query changes, the equals formulas #ref out. I am trying to create a macro that will copy the formulas down whenever the query table is refreshed. I have the following in a worksheet object. However, when I try to run the macro, it does not show up in the macro list. Any help would be much appreciated.
Private Sub Worksheet_QueryTableRefresh(ByVal Target As QueryTable)
Range("F2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Range("F2").Select
End Sub
I have a query pulling in data from an external database. In the same worksheet, I have cells equaling cells in the query table. When data in the query changes, the equals formulas #ref out. I am trying to create a macro that will copy the formulas down whenever the query table is refreshed. I have the following in a worksheet object. However, when I try to run the macro, it does not show up in the macro list. Any help would be much appreciated.
Private Sub Worksheet_QueryTableRefresh(ByVal Target As QueryTable)
Range("F2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Range("F2").Select
End Sub