PC Review


Reply
Thread Tools Rate Thread

copy all but formula to next empty column

 
 
Miree
Guest
Posts: n/a
 
      23rd Oct 2008
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 With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      23rd Oct 2008
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy range if column N is empty ajm1949 Microsoft Excel Programming 24 13th May 2010 05:00 AM
For every empty cell in a column, copy the value from the above ce Charles Robe Microsoft Excel Programming 3 22nd Nov 2008 09:36 PM
How to copy data to the next empty cell in a column suruukko Microsoft Excel Worksheet Functions 2 22nd Jul 2006 12:35 PM
Copy from row above if cell is empty in column =?Utf-8?B?SmFja3kgRC4=?= Microsoft Excel Misc 2 20th Dec 2005 07:36 PM
Copy a value to the next empty cell in a column Pete Csiszar Microsoft Excel Programming 1 7th Nov 2004 07:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:07 AM.