So I have 8 different tables, some with up to 65 columns, others less.
Current I have formulas in the columns for those which need formulas.
I kind of want to transition away from having the formulas in-cell, where they can be changed, erased, etc., to having them be coded.
However, I am trying to figure out what is the "best-practice" for coding formulas into cells/columns from VBA, specifically for tables (if that makes a difference).
I am currently doing it this way:
It works, but it seems kind of ..... clunky (???) to me.
Is there a proper way, or a standardized way, or perhaps a more efficient way to do it?
Granted, I have like 70+ different formulas across all tables, some similar others unique.
Am I going to run into any issues by doing it the way I wrote above?
Thanks for the input!
-Spydey
P.S. The tables will be growing and shrinking as data is added/removed from them. I don't think this will have an effect at all but I thought it was important to know.
Current I have formulas in the columns for those which need formulas.
I kind of want to transition away from having the formulas in-cell, where they can be changed, erased, etc., to having them be coded.
However, I am trying to figure out what is the "best-practice" for coding formulas into cells/columns from VBA, specifically for tables (if that makes a difference).
I am currently doing it this way:
Code:
ListObject.ListColumns("Column name").DataBodyRange.FormulaR1C1 = "new formula"
It works, but it seems kind of ..... clunky (???) to me.
Is there a proper way, or a standardized way, or perhaps a more efficient way to do it?
Granted, I have like 70+ different formulas across all tables, some similar others unique.
Am I going to run into any issues by doing it the way I wrote above?
Thanks for the input!
-Spydey
P.S. The tables will be growing and shrinking as data is added/removed from them. I don't think this will have an effect at all but I thought it was important to know.
Last edited: