View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default How to Inserting rows above specified cell

Hi Arun

--If you want to insert a row above A1;the below one line will do.
Rows(12).Insert

--The below macro will find the cell value 'Total' and insert a row on top
of that row..

Sub Macro()
Dim varFound As Variant
Set varFound = ActiveSheet.Range("A:A").Find("Total", _
LookIn:=xlValues)
Rows(varFound.Row).Insert
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"arun" wrote:

Hi All,

I wanted to insert rows above the specified cell (consider 'A12') .

Example:
A1-this
A2-That
---
---
A12- Total

So i wanted to insert rows above this 'A12' cell range

Please help me on this.

Thanks