View Single Post
 
Old 08-21-2019, 02:22 PM
trevorc trevorc is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: Jan 2017
Posts: 174
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default use a named column in table

Hi all,
I have a table with headers, how can I change the code below to reference the column name in stead of the range of cells the same as when I use it to select the data from that Row.
Any ideas appreciated, thanks.



Code:
      If Not Intersect(Target, Sh.Range("AM4:AM5000")) Is Nothing Then ' notes field
            ActiveCell.FormulaR1C1 = "Date " & Date & " , " & Intersect(ACRow, tblColumns("Contact Name").Range) & ", " & _
            Intersect(ACRow, tblColumns("Company Name").Range) & vbCrLf & Intersect(ACRow, tblColumns("Email Address").Range) & " Phone " & _
            Format(Intersect(ACRow, tblColumns("Phone").Range), "0000 000 000") & vbCrLf & "Name on Card " & _
            Intersect(ACRow, tblColumns("Name on Card").Range)
            Exit Sub
        End If
Reply With Quote