Sub ReplaceTotal()
Dim s as String, cell as Range, rng as Range
Dim i as Long
set rng = range(cells(1,1),cells(rows.count,1).end(xlup))
for each cell in rng
if instr(1,cell,"total",vbTextcompare) then
i = cell.row - 2
do until len(Trim(cells(i,1))) = 0
i = i - 1
loop
cell.Value = cells(i +1,1).Value
end if
next
end sub
--
Regards,
Tom Ogilvy
"Ricky Pang" wrote in message
...
Tom,
Just to clarify, the header and all titles (subtitles) are all within
column A. The data figures are in column B and beyond.
Thanks,
Ricky
*** Sent via Developersdex http://www.developersdex.com ***