Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Excel Expert and Users,
This code produces a column of Comment boxes on sheet "Your Notes" if a certain value happens on another sheet, the value "L" or "LE". I would like to start a new column of comment boxes if the comments reach row 30 in column A. Move over to column E and put the comments there until it reaches row 30 and move over to column I and then to column M. Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer Dim j As Integer i = Target.Row j = Target.Column On Error Resume Next If Intersect(Target, Range(j & ":" & i)) Is Nothing Then Exit Sub Else If Intersect(Target, Range(j & ":" & i)).Value = "L" Then Sheets("Your Notes").Activate Sheets("Your Notes").Range("A100").End(xlUp).Offset(2, 0).Select With Selection .Value = "Late" .AddComment .Comment.Text Text:=Sheets("Main Sheet").Cells(12, j).Value & _ Chr(10) & Cells(i, "D").Value .Comment.Visible = True End With End If If Intersect(Target, Range(j & ":" & i)).Value = "LE" Then Sheets("Your Notes").Activate Sheets("Your Notes").Range("A100").End(xlUp).Offset(2, 0).Select With Selection .Value = "Left early" .AddComment .Comment.Text Text:=Sheets("Main Sheet").Cells(12, j).Value & _ Chr(10) & Cells(i, "D").Value .Comment.Visible = True End With End If End If End Sub Thanks for any help. Regards, Howard |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For the record, I was able to solve my problen using "GoTo".
Regards, Howard "L. Howard Kittle" wrote in message . .. Hello Excel Expert and Users, This code produces a column of Comment boxes on sheet "Your Notes" if a certain value happens on another sheet, the value "L" or "LE". I would like to start a new column of comment boxes if the comments reach row 30 in column A. Move over to column E and put the comments there until it reaches row 30 and move over to column I and then to column M. Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer Dim j As Integer i = Target.Row j = Target.Column On Error Resume Next If Intersect(Target, Range(j & ":" & i)) Is Nothing Then Exit Sub Else If Intersect(Target, Range(j & ":" & i)).Value = "L" Then Sheets("Your Notes").Activate Sheets("Your Notes").Range("A100").End(xlUp).Offset(2, 0).Select With Selection .Value = "Late" .AddComment .Comment.Text Text:=Sheets("Main Sheet").Cells(12, j).Value & _ Chr(10) & Cells(i, "D").Value .Comment.Visible = True End With End If If Intersect(Target, Range(j & ":" & i)).Value = "LE" Then Sheets("Your Notes").Activate Sheets("Your Notes").Range("A100").End(xlUp).Offset(2, 0).Select With Selection .Value = "Left early" .AddComment .Comment.Text Text:=Sheets("Main Sheet").Cells(12, j).Value & _ Chr(10) & Cells(i, "D").Value .Comment.Visible = True End With End If End If End Sub Thanks for any help. Regards, Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to transpose and concatenate long list in one column? | Excel Worksheet Functions | |||
Need a formula to 'find' word in cells of column from a long list | Excel Worksheet Functions | |||
Excel Taking Long TIme to Start | Excel Discussion (Misc queries) | |||
Print a long 2 page column list, on one page | Excel Discussion (Misc queries) | |||
how do you keep fields in a column to print out for long list | Setting up and Configuration of Excel |