Hello: I'm stumped. I have a macro that moves the cell into row 2 of a column and this column will change depending on the original data submitted. So I was trying to set up a formula that builds a sumifs formula based on relative references but then copies this across columns to the right of the active cell which means I need absolute references.
Example in Cell X2 I want the formula to read: =SUMIFS($U:$U,$V:$V,$V2,$R:$R,X$1)
When this gets copied to Y2 it should read =SUMIFS($U:$U,$V:$V,$V2,$R:$R,Y$1) etc.
if I enter:
ActiveCell.FormulaR1C1 = "=SUMIFS(C[-3],C[-2],rc[-2],C[-6],R1C)" it returns =SUMIFS(U:U,V:V,V2,R:R,X$1) in the spreadsheet
ActiveCell.FormulaR1C1 = "=SUMIFS(C21,C22,RC22,C18,R1C)" doesn't work either because the data won't always be in columns 21, 22, etc.
I've tried various things including trying to build formulas using & and $ signs but can't figure this one out.
Anyone have any idea how to make this work?
Thanks!
Bookmarks