JenniferMurphy
Well-known Member
- Joined
- Jul 23, 2011
- Messages
- 2,525
- Office Version
- 365
- Platform
- Windows
Is there a way a UDF can access cells in a named range in the row just above the row from where it was called?
In this example, The "Parm1" is assigned "$D:$D" and "Parm2" is assigned "$E:$E". I would like a UDF that would add up the values in Parm1 and Parm2 in the row one up from the calling row.
For example, if called from C8 (as shown in F8), it would add D7 + E7 = 5 + 9 and return 14.
My actual UDF is much more complicated. But if I can get this simple one to work, I can handle the rest.
I already have it working passing the exact cells as parameters as in G8, but the actual UDF takes several more parameters and I want to minimize the chances for typos.
In this example, The "Parm1" is assigned "$D:$D" and "Parm2" is assigned "$E:$E". I would like a UDF that would add up the values in Parm1 and Parm2 in the row one up from the calling row.
For example, if called from C8 (as shown in F8), it would add D7 + E7 = 5 + 9 and return 14.
My actual UDF is much more complicated. But if I can get this simple one to work, I can handle the rest.
I already have it working passing the exact cells as parameters as in G8, but the actual UDF takes several more parameters and I want to minimize the chances for typos.