Marco / code for cell on inserted row

mohamad

New Member
Joined
Oct 1, 2003
Messages
2
(y)
Help
I need a macro or code to put a data cell (H14) into C column cell after inserting a row anywhere on sheet.
ie. H14 in row 16, column C, or
H14 in row 50, Column C.
Hope I explained this properly.

Thanks a bunch

( somewhere in the western desert)
mohamad
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

fairwinds

MrExcel MVP
Joined
May 15, 2003
Messages
8,638
Maybe:

Code:
Sub xxx()
ActiveCell.EntireRow.Insert Shift:=xlDown
Cells(ActiveCell.Row, 3) = Range("H14")
End Sub
 

al_b_cnu

Well-known Member
Joined
Jul 18, 2003
Messages
4,518
Hi,

Welcome to the board.

If I understand your requirement correctly, I think you are wanting an event to insert data when you insert a row into your spreadsheet - right?

If so (and apologies if I'm wroong), I dont know of any event which will detect the insertion of a row. Perhaps you could write a 'BeforeDoubleClick' event to actually insert the row & then insert the data into the appropriate cell i the row.

HTH

Alan
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,561
Messages
5,765,109
Members
425,260
Latest member
worldbfreebase

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top