E
embirath
Hi everyone
I'm trying to create a function which uses some neighboring cel
values. The neighboring cells will always be at a constant relativ
offset from the cell containing the formula.
To do this, I think I need to use the Offset object to specify whic
neighboring cells to use. But how do I specify the "current cell", o
"this cell", ie the cell which contains the formula? What will be th
"parent" of this Offset object?
If there was such a thing as a "CurrentCell", my formula might loo
something like
If CurrentCell.Offset(-1,0) = "OneThing" then
CurrentCell = CurrentCell.Offset(0,-2)
CurrentCell.Offset(0,-1)
Else if CurrentCell.Offset(-1,0) = "SomethingElse" then
CurrentCell = CurrentCell.Offset(0,-2)
CurrentCell.Offset(0,-1)
End if
Is there something equivalent to the "CurrentCell"?? "ActiveCell" doe
NOT work since some other cell might be active if/when the worksheet i
recalculated.
Let me know if you have any ideas.
Thanks!
Emm
I'm trying to create a function which uses some neighboring cel
values. The neighboring cells will always be at a constant relativ
offset from the cell containing the formula.
To do this, I think I need to use the Offset object to specify whic
neighboring cells to use. But how do I specify the "current cell", o
"this cell", ie the cell which contains the formula? What will be th
"parent" of this Offset object?
If there was such a thing as a "CurrentCell", my formula might loo
something like
If CurrentCell.Offset(-1,0) = "OneThing" then
CurrentCell = CurrentCell.Offset(0,-2)
CurrentCell.Offset(0,-1)
Else if CurrentCell.Offset(-1,0) = "SomethingElse" then
CurrentCell = CurrentCell.Offset(0,-2)
CurrentCell.Offset(0,-1)
End if
Is there something equivalent to the "CurrentCell"?? "ActiveCell" doe
NOT work since some other cell might be active if/when the worksheet i
recalculated.
Let me know if you have any ideas.
Thanks!
Emm