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

fill blank rows data

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

ResolvedVersion 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:

Sorting data stored in rows

Primarily Excel is set up to sort data that is stored in columns rather than rows.

It is possible to get Excel to sort data stored in rows however.

Click in the row you want to sort, or select the cells in the rows you wish to sort.

Go to Data - Sort, then go to the Options button in the bottom left corner of the Sort dialogue box.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.