Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It happens that john taiariol formulated :
original question: i would to create VBA code that will bring up a dialogue box if the words "TOOL ASSEMBLY" are input under column "F". I would like to place certain words A, B, C, D whatever in a corresponding column on the same row. Is this possible? any help is greatly appreciated, thanks. answer: Option Compare Text Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'when entering data in a cell in Col F On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 6 Then n = Target.Row If Excel.Range("F" & n).Value = "TOOL ASSEMBLY" Then Excel.Range("G" & n).Value = "A, B, C, D or whatever" End If End If enditall: Application.EnableEvents = True End Sub this works great thanks. just one thing, is it possible to look for a column heading such as "Name" instead of column "F", thanks again for the help. You can define Names for your columns. This would usually be something that relates to the headers for each column. Example: $A:$A: Header: "Field1" Defined Name: "Sheet1!Field1" ..where Sheet1 is the name of the worksheet RefersTo: ='Sheet1'!$A:$A -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return Column Heading based on value in row | New Users to Excel | |||
Offset based on column heading | Excel Programming | |||
Row filtering based on input box entry (column heading) | Excel Worksheet Functions | |||
Formatting a range based on contents of column/row heading | Excel Programming | |||
Formatting a range based on contents of column/row heading | Excel Programming |