View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie[_2_] David McRitchie[_2_] is offline
external usenet poster
 
Posts: 134
Default Macro that inserts rows and copy values

Don't know what you mean by repeat in another workbook.
If you mean available in any workbook then install the
macro in your personal.xls
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Inserting a row and copying values (and not formulas) see
http://www.mvps.org/dmcritchie/excel/insrtrow.htm

if you want to keep constants as well as the values then delete the
following in a copy of the macro:

' to remove the non-formulas -- 1998/03/11 Bill Manville
Selection.Offset(1).Resize(vRows).EntireRow. _
SpecialCells(xlConstants).ClearContents

--
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Emece" wrote in message ...
I want to design a macro so as to do the following thing:
Insert a row.
Copy the value that is in a cell of the immediate before
row.
Copy this value in the row inserted.

I want the macro to repeat this in the whole workbook.

I know it is a simple one, but I can't figure it out
correctly.

Thanks a lot