Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default I think this is ridiculous

Right click on the sheet tab and select view code.

In the resulting sheet module, at the top of the module are two dropdowns.
In the left dropdown select Worksheet and in the right dropdown select
Change (not SelectionChange)

You should get a sub declaration like this

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub


You can put your code there. Use code like this (you can paste in this code
over the declaration if you wish)

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrHandler
If Target.Column < 7 Then Exit Sub ' change made in column G
If Target.Count 1 Then Exit Sub
If Target.Value = "N" Then
Application.EnableEvents = False
Target.Offset(1, 0).EntireRow.Insert
End If
ErrHandler:
Application.EnableEvents = True
End Sub


--
Regards,
Tom Ogilvy



"Steve" wrote in message
...
I have a worksheet with as many as 100 lrows of info that track shipments.

If
i mark an "N" in column G a second row for that shipping numbers is

rquired.
My boss wants me to make that automated. So the row will be automatically
inserted. Any help is appreciated.

Thanks,
Steve



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



All times are GMT +1. The time now is 04:11 PM.

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

About Us

"It's about Microsoft Excel"