Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying a row into the first blank row 1

Status
Not open for further replies.

Morglisn

Industrial
Jan 31, 2003
65
Hey, guys.

I'm trying to have my script find the first available blank row, and copy the row immediately above it (formulas and formats only) onto the blank row. Any ideas on how to go about this? And take it easy on me, I'm fairly new to VBA.

Thanks!!
 
Replies continue below

Recommended for you

You could try something like this, this searches down column A for an empty cell and then copies the formats and formulas of the previous row.

sub macro1()
Columns("A:A").Select
blankrow = Selection.Find(xlEndrow).Row
copyrow = blankrow - 1
Rows(copyrow).Copy
Rows(blankrow).PasteSpecial Paste:=xlFormats
Rows(blankrow).PasteSpecial Paste:=xlFormulas
end sub

I hope i have understood your problem correctly.
 
You certainly did, and thanks! I've used what I've gotten here and tek-tips to write my own code (I hate copy-paste, especially when I'm not sure how it works). I learned enough from all of you to get it going..

Thanks a bunch!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor