Macro Help

  • Thread starter Thread starter DMP
  • Start date Start date
D

DMP

I have a macro below that does a refresh to a query and
then reformats the table....what happens is after the
refresh, some of the cells in column B come up empty. The
formula in that column does not copy itself to all of the
cells...there is no identifiable pattern to this behavior.
So what I would like to do is after the refresh have excel
parse column B and if it finds a blank cell within my
defined range, it will copy the formula from the cell
above into the blank cell.....
Or, maybe there is a better way....


Sub Refresh_Format()
'
' Refresh_Format Macro
' Macro recorded 4/30/2004 by David Morrison
'

'
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.RowHeight = 11.25
Selection.ColumnWidth = 13.86
End Sub
 
Several ways to do this. Is the formula the same for the whole range.
Examples of 3-4 formulas??
 
No thats just one formula in column B but it goes down the
entire column in the defined range.....there are different
formulas in cells in the range....

David
 
B contains =(NOW()-$C525) actually...this sheet is a query
so no ..this is the only formula on that sheet....my bad
on the previous explanation.....that formula was aded to
tell me how long a record has been opened.....

D
 
Back
Top