I have noticed that when I manually insert a new column, the following SUM column gets automatically adjusted correctly, which is what I expect. However, the SUM column is not corrected if I insert the column using an Excel macro.
SETUP
1. columns C thru H contain client data and column I cells are set to SUM($Cx:Hx) where x is the row number
2. insert a new client column I to the left of the current I column, which pushes the old SUM column I to column J
OUTCOMES
1. via manually - the SUM column J now reads SUM($Cx:Ix) (correct)
2. via macro - the SUM column still shows SUM($Cx:Hx) (incorrect)
What am I missing here? I had to then write more VBA code using the Find/Replace function to change all column J formulas from :H's to :I's. My macro works but I must be missing some logical flag set or something. Any ideas?
Bookmarks