View Single Post
 
Old 08-26-2019, 08:40 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

a) Define your table as Table. You can refer to Table columns dataranges using Table name (when referring to it outside of Table) and column header as column name (a Table header must be in single row) either in workdheet formulas and in VBA code. Whenever you edit column header in Table, this change is reflected in all worksheet formulas automatically (but you have to edit VBA);

b) Define datarange of every column of your table you want refer to as Named Range with name of Named Range equal to column header. The best solution will be to define them as Dynamic ones - i.e. Named Range adjusts atomatically whenever new rows are aded to table or deleted from it. To define Dynamic Named Ranges based on table, the table must have some column datarange which never is empty. One possibility is to have a column with formula which returns row number for every entry. In worksheet formulas you can refer to Defined name ´using it's name. In VBA, you can refer to defined name like YourNamedRange as [YourNamedRange].
Reply With Quote