Hi Frank - (insert 'x' No. Of Rows)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can you give me an example of how i could do this using VBA.
Any help is much appreciated.
 
Hi,

Try the following posted earlier by Bob Phillips

Sub InsertRowsAndFillFormulas()
Dim x
x = InputBox( _
prompt:="How many rows do you want to add?", _
Title:="Add Rows")
If x = "" Or x < 1 Then
Exit Sub
Else
ActiveCell.Resize(x, 1).EntireRow.Insert
End If

End Sub

HTH
 
Sorry about re-post, my explorer crashed....should have waited.

Thanks for the example... works a treat.
Al
 
You have another example (using countif() at your original post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top