![]() |
Creating input messages or comments
Hi all
I have a large worksheet and one column contains a code consisting of two letters. The two letters represent the name of a particular division Division. For example, FG would mean 'Food Group', HR would mean 'Healthcare'. As there are too many for me to remember what they all mean, is there a way I can click onto a cell and Excel gives me an 'input message' style box, telling me what the code stands for? I have tried to use Data Validation but can't get that to work as it shows the same input message regardless of what cell I am on. By the way, the worksheet is sorted in numerical order by another column so I can't sort it by the Code and then apply separate input messages. Does anybody have any other ideas??? Thank you. Louise |
Creating input messages or comments
Hi
You need to use Data Validation on each cell, separately. If you do this, you can have different 'input messages' for each one. Andy. "Louise" wrote in message ... Hi all I have a large worksheet and one column contains a code consisting of two letters. The two letters represent the name of a particular division Division. For example, FG would mean 'Food Group', HR would mean 'Healthcare'. As there are too many for me to remember what they all mean, is there a way I can click onto a cell and Excel gives me an 'input message' style box, telling me what the code stands for? I have tried to use Data Validation but can't get that to work as it shows the same input message regardless of what cell I am on. By the way, the worksheet is sorted in numerical order by another column so I can't sort it by the Code and then apply separate input messages. Does anybody have any other ideas??? Thank you. Louise |
Creating input messages or comments
Isn't there a quicker way of doing this rather than each cell individually?
There are hundreds of them. Thanks. "Andy" wrote: Hi You need to use Data Validation on each cell, separately. If you do this, you can have different 'input messages' for each one. Andy. "Louise" wrote in message ... Hi all I have a large worksheet and one column contains a code consisting of two letters. The two letters represent the name of a particular division Division. For example, FG would mean 'Food Group', HR would mean 'Healthcare'. As there are too many for me to remember what they all mean, is there a way I can click onto a cell and Excel gives me an 'input message' style box, telling me what the code stands for? I have tried to use Data Validation but can't get that to work as it shows the same input message regardless of what cell I am on. By the way, the worksheet is sorted in numerical order by another column so I can't sort it by the Code and then apply separate input messages. Does anybody have any other ideas??? Thank you. Louise |
Creating input messages or comments
Louise
There are many other ways of helping you with this. You could keep a list of the initials - along with their meanings - on a separate sheet. Using a VLOOKUP formula and an input cell, you could pull back the information you need. It depends on the layout of your sheets and the data itself, really. Andy. "Louise" wrote in message ... Isn't there a quicker way of doing this rather than each cell individually? There are hundreds of them. Thanks. "Andy" wrote: Hi You need to use Data Validation on each cell, separately. If you do this, you can have different 'input messages' for each one. Andy. "Louise" wrote in message ... Hi all I have a large worksheet and one column contains a code consisting of two letters. The two letters represent the name of a particular division Division. For example, FG would mean 'Food Group', HR would mean 'Healthcare'. As there are too many for me to remember what they all mean, is there a way I can click onto a cell and Excel gives me an 'input message' style box, telling me what the code stands for? I have tried to use Data Validation but can't get that to work as it shows the same input message regardless of what cell I am on. By the way, the worksheet is sorted in numerical order by another column so I can't sort it by the Code and then apply separate input messages. Does anybody have any other ideas??? Thank you. Louise |
Creating input messages or comments
Louise,
I have prepared a VBA event macro, which can be fired whenever you select a cell in a specific column. It presupposes that you have somewhere in your workbook a table with two columns, one with the 2-letter codes and one with the full names. To install it you need to copy the following VBA code, after you make the necessary changes. The right click the sheet tab, choose View Code... and, once the VBA module comes up, paste the modified code. It is not perfect, but it might be close to what you need. Whenever the user clicks on a cell in the specific column, a comment comes up with the full name. When you click elsewhere the old comment is removed and the new one appears. --------cut below--------- Dim oldCell As Range Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim MyColumn As Integer Dim cell As Range Dim CodesTable As Range Set CodesTable = Sheets("Sheet1").Range("A1:C100") If Not oldCell Is Nothing Then oldCell.ClearComments Set oldCell = Target.Cells(1, 1) MyColumn = 3 Set cell = Target.Cells(1, 1) If cell.Column = MyColumn And Len(cell.Value) < 0 Then cell.ClearComments cmttext = Application.WorksheetFunction.VLookup(cell.Value, CodesTable, 2, 0) cell.AddComment Text:=cmttext cell.Comment.Visible = False End If End Sub -------------End cut --------------- What you need to change: MyColumn = 3 -- change it to the number of the column where the 2-letter codes appear. Set CodesTable = Sheets("Sheet1").Range("A1:B10") -- change the sheetname and the range with your table. Let us know if it works. HTH Kostis Vezerides |
All times are GMT +1. The time now is 03:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com