ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formats of the Row above (https://www.excelbanter.com/excel-programming/340426-formats-row-above.html)

achidsey

Formats of the Row above
 

Excel Experts,

What code would I use to say,

Make the format of each cell in this row, the same as the format of the cell
in the row above ?

Thanks,
Alan

--
achidsey

Tom Ogilvy

Formats of the Row above
 
ActiveCell.Offset(-1,0).EntireRow.copy
Rows(ActiveCell.row).Pastespecial xlPasteFormats

--
Regards,
Tom Ogilvy


"achidsey" (notmorespam) wrote in message
...

Excel Experts,

What code would I use to say,

Make the format of each cell in this row, the same as the format of the

cell
in the row above ?

Thanks,
Alan

--
achidsey




Tim Williams

Formats of the Row above
 
Application.ScreenUpdating = False
With ActiveCell
.Offset(-1, 0).EntireRow.Copy
.EntireRow.Cells(1).PasteSpecial xlPasteFormats
.Select
End With

Application.CutCopyMode = False
Application.ScreenUpdating = True


Tim


"achidsey" (notmorespam) wrote in message
...

Excel Experts,

What code would I use to say,

Make the format of each cell in this row, the same as the format of
the cell
in the row above ?

Thanks,
Alan

--
achidsey




achidsey

Formats of the Row above
 
Tom and Tim, Thanks for the response. Alan

--
achidsey


"achidsey" wrote:


Excel Experts,

What code would I use to say,

Make the format of each cell in this row, the same as the format of the cell
in the row above ?

Thanks,
Alan

--
achidsey



All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com