I have this code:
While Not (IsEmpty(Selection))
pointer.Offset(0, 1).Formula = pointer.Offset(0, 1).Formula & "+sumif('" & sourcesheet & "'!" & chr(columnfinder)+64 & ":" & chr(columnfinder)+64 & "," & pointer.Value & ",'" & sourcesheet & "'!" & chr(Selection.Value)+64 & ":" & chr(Selection.Value)+64 & ")"
Selection.Offset(1, 0).Select
Wend
pointer.Offset(0, 1).Formula = "=" & pointer.Offset(0, 1).Formula
where columnfinder is a number I got from selection.column and selection.value is a number I got from somecell.column. Surely, this does not have to be done wiht r1c1 equations which never work.
Is there some other way to build these functions? Surely, excel can't be this difficult. Otherwise what happens if your formula has to reference past column z?
While Not (IsEmpty(Selection))
pointer.Offset(0, 1).Formula = pointer.Offset(0, 1).Formula & "+sumif('" & sourcesheet & "'!" & chr(columnfinder)+64 & ":" & chr(columnfinder)+64 & "," & pointer.Value & ",'" & sourcesheet & "'!" & chr(Selection.Value)+64 & ":" & chr(Selection.Value)+64 & ")"
Selection.Offset(1, 0).Select
Wend
pointer.Offset(0, 1).Formula = "=" & pointer.Offset(0, 1).Formula
where columnfinder is a number I got from selection.column and selection.value is a number I got from somecell.column. Surely, this does not have to be done wiht r1c1 equations which never work.
Is there some other way to build these functions? Surely, excel can't be this difficult. Otherwise what happens if your formula has to reference past column z?