Thread: [Solved] on click increment
View Single Post
 
Old 02-21-2012, 10:45 PM
gsrikanth gsrikanth is offline Windows XP Office XP
Competent Performer
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default on click increment

in my excel file, only i need to do click
on first click on cell get one, then two like this so on

vb code, This gave an idea this gave row name, but i need on click one, two , three, four so on

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim RowOffset As Long
Dim IndexCol As String
'Set values
RowOffset = 0
'Change the C to the column where you want the numbers to show
IndexCol = "C"

Intersect(ActiveCell.EntireRow, Columns(IndexCol)).Value = ActiveCell.Row + RowOffset
End Sub

Last edited by gsrikanth; 02-23-2012 at 02:01 AM.
Reply With Quote