[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Re: Row Number with Text

Otto Moehrbach

12/19/2006 8:48:00 PM

Michael
By "updated" I take that to mean the contents of a cell in Column A has
changed (not to blank though). Is that right?
And when that happens you want the row number and the letter D placed in the
15th column. Is that right?
The following macro will do that. Note that this macro must be placed in
the sheet module of your sheet. To access that module, right-click on the
sheet tab, select View Code, and paste this macro into that module. "X" out
of that module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Target.Column <> 1 Then Exit Sub
Cells(Target.Row, 15).Value = Target.Row & "D"
End Sub
"Michael" <Michael@discussions.microsoft.com> wrote in message
news:17A8AE3D-45AF-4D5A-879A-E03727C08EEC@microsoft.com...
> Hi,
>
> I have the following file layed out as:
>
> Column1 Column2..... Column15
> Admin 2D
> Dispatch 3D
> Fleet 4D
>
> What I am trying to do is when column 1 is updated, then on column 15 add
> the row for that cell, let's say cell A2, along with a character, in this
> case the letter D.
>
> How do I do that using VB?