Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 184
Default Visual to copy format one row down when data entered

I have an excell sheet with tables in it that I want to shift down the format
one row when data is entered in the cell above. Below is an example of what
I am looking for.

Example one
a b c
1 1 2 3
2 1 4 6
3
4 1 3 2
5


Example Two when data is entered in row 3 and 5 from above example
a b c
1 1 2 3
2 1 4 6
3 1 9 7
4
5 1 3 2
6 1 2 9
7




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Visual to copy format one row down when data entered

No special case testing done in this code. If the cell below the one you
just made a change in has something in it, then a blank row is inserted. The
sheet this is used on cannot be protected.

To put the code to work, go to the sheet where this all needs to happen and
right-click on its name tab and choose [View Code] from the list. Copy the
code below and paste it into the code module that is presented to you and
then close the Visual Basic Editor window. Give it a test run.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not IsEmpty(Target.Offset(1, 0)) Then
Application.EnableEvents = False
Application.ScreenUpdating = False
Target.Offset(1, 0).EntireRow.Insert
Application.EnableEvents = True
End If
End Sub


"Jeremy" wrote:

I have an excell sheet with tables in it that I want to shift down the format
one row when data is entered in the cell above. Below is an example of what
I am looking for.

Example one
a b c
1 1 2 3
2 1 4 6
3
4 1 3 2
5


Example Two when data is entered in row 3 and 5 from above example
a b c
1 1 2 3
2 1 4 6
3 1 9 7
4
5 1 3 2
6 1 2 9
7




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy last data entered into mulitiple sheets within a workbook? Big Al[_2_] Excel Discussion (Misc queries) 2 April 9th 09 04:50 PM
Change the format as data is entered Niju David Excel Discussion (Misc queries) 4 June 22nd 08 06:28 PM
cell format changed when data entered John Keith Excel Discussion (Misc queries) 1 September 14th 07 06:04 AM
analysis of data entered on excel questionnaire format xoxweemelxox Excel Worksheet Functions 1 July 17th 06 12:58 PM
Link or Copy Excel Data to Calendar (for scheduling) for Visual Aid supafreeza Excel Discussion (Misc queries) 1 July 10th 05 04:47 AM


All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"