Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am trying to create a macro to create Comments in Cells from text i adjacent cells. Is this possible -- psmal ----------------------------------------------------------------------- psmall's Profile: http://www.excelforum.com/member.php...fo&userid=2764 View this thread: http://www.excelforum.com/showthread.php?threadid=50814 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, it's possible. Turn on the macro recorder (Tools | Macro Record new
macro...), do whatever it is you want by hand, and turn off the recorder. In most cases, XL will give you the necessary code that you can then adapt and customize further. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... I am trying to create a macro to create Comments in Cells from text in adjacent cells. Is this possible? -- psmall ------------------------------------------------------------------------ psmall's Profile: http://www.excelforum.com/member.php...o&userid=27647 View this thread: http://www.excelforum.com/showthread...hreadid=508147 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have tried to do use the recorder and have copied the text but i copies the exact text into the macro rather than the key process i.e copy and paste. How do I get it to copy in a relative form rather tha absolute? Sub Macro5() ' ' Macro5 Macro ' Macro recorded 03/02/2006 by Philip Small ' Range("b1").Select ActiveCell.FormulaR1C1 = "Reversible acid pump inhibitor, Phase I" Range("A1").Select Range("A1").Comment.Text Text:="Reversible acid pump inhibitor Phase I" Range("B2").Select End Su -- psmal ----------------------------------------------------------------------- psmall's Profile: http://www.excelforum.com/member.php...fo&userid=2764 View this thread: http://www.excelforum.com/showthread.php?threadid=50814 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub BB()
Dim rng As Range Set rng = Range(Cells(1, 2), Cells(Rows.Count, 2).End(xlUp)) For Each cell In rng If Len(Trim(cell.Value)) < 0 Then cell.Offset(0, -1).NoteText Text:=cell.Offset.Text End If Next End Sub -- Regards, Tom Ogilvy "psmall" wrote in message ... I have tried to do use the recorder and have copied the text but it copies the exact text into the macro rather than the key process i.e. copy and paste. How do I get it to copy in a relative form rather than absolute? Sub Macro5() ' ' Macro5 Macro ' Macro recorded 03/02/2006 by Philip Small ' Range("b1").Select ActiveCell.FormulaR1C1 = "Reversible acid pump inhibitor, Phase I" Range("A1").Select Range("A1").Comment.Text Text:="Reversible acid pump inhibitor, Phase I" Range("B2").Select End Sub -- psmall ------------------------------------------------------------------------ psmall's Profile: http://www.excelforum.com/member.php...o&userid=27647 View this thread: http://www.excelforum.com/showthread...hreadid=508147 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi P,
Try: '============= Public Sub Tester() Dim rng As Range Dim rCell As Range Dim sStr As String Set rng = Selection '<<==== CHANGE For Each rCell In rng.Cells With rCell On Error Resume Next .Offset(0, 1).Comment.Delete On Error GoTo 0 .Offset(0, 1).AddComment Text:=.Text End With Next rCell End Sub '<<============= --- Regards, Norman "psmall" wrote in message ... I am trying to create a macro to create Comments in Cells from text in adjacent cells. Is this possible? -- psmall ------------------------------------------------------------------------ psmall's Profile: http://www.excelforum.com/member.php...o&userid=27647 View this thread: http://www.excelforum.com/showthread...hreadid=508147 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good afternoon,
You could try something like this: Sub Macro1() Range("E4").Comment.Text Text:=Range("E1").Value End Sub to pick up the value of the cell note from cell E1 or Sub Macro2() Selection.Comment.Text Text:=Selection.Offset(0, -2).Value End Sub to pick up the value of the cell note from the cell two cells to the left Hope this helps Have a good weekend Pete "psmall" wrote: I am trying to create a macro to create Comments in Cells from text in adjacent cells. Is this possible? -- psmall ------------------------------------------------------------------------ psmall's Profile: http://www.excelforum.com/member.php...o&userid=27647 View this thread: http://www.excelforum.com/showthread...hreadid=508147 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically create comments based upon cell value and related datain database | Excel Discussion (Misc queries) | |||
Create Comments | Excel Worksheet Functions | |||
Macro to create formula in cell | Excel Discussion (Misc queries) | |||
Create & Format XL Comments with VBA | Excel Programming | |||
Create Excel sheet in HTML with comments | Excel Programming |