Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need unique ID in Row 1
How do i modify this code to have value of ( 1+value in column A from 1 row above ) instead of static 1 Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub On Error GoTo errHandler: If Target.Column = 2 And Target.Value < "" Then Cells(Target.Row, 3).Value = "New" Cells(Target.Row, 1).Value = 1 Cells(Target.Row, 5).Select End If errHandler: Application.EnableEvents = True End Sub I thought that i could search for max in column A and then add 1 Or remember previous value and insert it in variable somehow how do i best acomplish this task ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous | Excel Discussion (Misc queries) | |||
previous post Increment a filename. | Excel Discussion (Misc queries) | |||
Inserting a new worksheet that is linked to a previous one | Excel Worksheet Functions | |||
Inserting new row and pasting formulas from previous row | Excel Discussion (Misc queries) | |||
Can I retain functions from a previous cell when inserting a new r | Excel Discussion (Misc queries) |