Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default copy all but formula to next empty column

I have a data entry sheet, to begin with data can only be entered into the
range G5:H59(some of the cells are merged).

I want to be able to search for the next empty cell, along row 5 then copy
all the formating calculations and data validation from G5:H59 to the
avalible column.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default copy all but formula to next empty column

Try this code

Sub CopyFormat()

For RowCount = 5 To 59
If Range("G" & RowCount) < "" Then
LastCol = Cells(RowCount, Columns.Count).End(xlToLeft).Column

Range("G" & RowCount).Copy
Cells(RowCount, LastCol + 1).PasteSpecial _
Paste:=xlPasteFormats, _
Paste:=xlPasteValidation
End If

Next RowCount

End Sub


"Miree" wrote:

I have a data entry sheet, to begin with data can only be entered into the
range G5:H59(some of the cells are merged).

I want to be able to search for the next empty cell, along row 5 then copy
all the formating calculations and data validation from G5:H59 to the
avalible column.

Thanks

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
Find first empty cell in column J. Copy, paste special, value from zzxxcc Excel Programming 12 September 12th 07 10:34 PM
How to copy data to the next empty cell in a column suruukko Excel Worksheet Functions 2 July 22nd 06 12:35 PM
copy content to first empty cell in column elrussell[_2_] Excel Programming 4 March 12th 06 04:16 PM
Copy from row above if cell is empty in column Jacky D. Excel Discussion (Misc queries) 2 December 20th 05 07:36 PM
Copy a value to the next empty cell in a column Pete Csiszar[_2_] Excel Programming 1 November 7th 04 07:26 AM


All times are GMT +1. The time now is 07:21 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"