fill blank rows data

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Fill Blank rows with data in cell above

Fill Blank rows with data in cell above

resolvedResolved · Low Priority · Version 2003

Edd has attended:
Excel VBA Intro Intermediate course

Fill Blank rows with data in cell above

I am trying to fill blank rows with data from the row above. I would like to avoid a loop mechanism as this will take some time to run.

Whenever I attempt to use Go To > Blanks and use RC -1 formulae excel informs me that the selection is too large.

Is there any way around this?

RE: Fill Blank rows with data in cell above

Hi Edd,

Thanks for your question. If you are trying to copy the entire row from above, i.e the shortcut CTRL + D, then try the following:

==================================

Sub CopyRowAbove()

Dim Row As Byte
Row = ActiveCell.Row

Rows(Row & ":" & Row).copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste

End Sub

==================================

See if this helps.

Kind regards,

Katie Woo
Microsoft Certified Trainer

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Using the Quick Access Toolbar in Excel2010

The Quick Access Toolbar is included in virtually every Office product, including Outlook 2010, Word 2010, Excel 2010, and PowerPoint 2010.

You will find the Quick Access Toolbar in the top-left side of the window. To begin, click the Customize button (it's the little black arrow at the end of the toolbar).

Simply click the commands you want to include.

Virtually any command can be added to the Quick Access Toolbar. Click the More Commands option and a new window will open from where you can browse the commands including those not on the ribbon.

View all Excel hints and tips


Server loaded in 0.09 secs.