![]() |
#2
|
||||
|
||||
![]()
First, the likes of:
Mid(ActiveCell.Address, 4, 4) can be more reliably written as: Activecell.row but you don't need it. Let's say that column J on your sheet has the header "hdr7" for the table. Then likes of: Code:
Sheets("Address Label").Range("C5") = Range("j" & Mid(ActiveCell.Address, 4, 4)) Code:
Sheets("Address Label").Range("C5") = intersect(activecell.EntireRow,activecell.ListObject.ListColumns("hdr7").Range) Code:
Set tbl = ActiveCell.ListObject Sheets("Payment Advice").Range("B3") = Date Sheets("Address Label").Range("C5") = Intersect(ActiveCell.EntireRow, tbl.ListColumns("hdr1").Range) Sheets("Payment Advice").Range("B4") = Intersect(ActiveCell.EntireRow, tbl.ListColumns("hdr2").Range) Sheets("Payment Advice").Range("B5") = Intersect(ActiveCell.EntireRow, tbl.ListColumns("hdr3").Range) Sheets("Payment Advice").Range("B6") = Intersect(ActiveCell.EntireRow, tbl.ListColumns("hdr4").Range) There'll many ways, this one not necessarily the slickest. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ssol2016 | Excel | 1 | 10-27-2016 08:47 AM |
creating a code to create dynamic text in word | ah8471 | Word VBA | 1 | 12-29-2015 10:52 PM |
![]() |
FenelonPaul | Excel | 5 | 09-23-2015 07:11 AM |
![]() |
Mikemo | Word | 3 | 02-05-2013 11:58 AM |
Dynamic Named Ranges using text | hannu | Excel | 0 | 06-22-2010 04:42 PM |