ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Function with results in offset cell (https://www.excelbanter.com/excel-programming/334298-function-results-offset-cell.html)

Andibevan[_2_]

Function with results in offset cell
 
Is it possible to build a function that will place one half of the result in
the active cell (as normal - cell where the formula is) and another part of
the result in the cell to the right of the active one?

Something like this (which doesn't work incidentally):-

Function testoff(var)
testoff = var + 10
ActiveCell.Offset(1, 1).Value = 1


End Function



Norman Jones

Function with results in offset cell
 
Hi Andi,

If your intentention is to use the function in a worksheet, this is not
possible as a udf can only return a value to the calling cell.

---
Regards,
Norman



"Andibevan" wrote in message
...
Is it possible to build a function that will place one half of the result
in
the active cell (as normal - cell where the formula is) and another part
of
the result in the cell to the right of the active one?

Something like this (which doesn't work incidentally):-

Function testoff(var)
testoff = var + 10
ActiveCell.Offset(1, 1).Value = 1


End Function





Andibevan[_2_]

Function with results in offset cell
 
Thought so - just was hoping...

Thanks

"Norman Jones" wrote in message
...
Hi Andi,

If your intentention is to use the function in a worksheet, this is not
possible as a udf can only return a value to the calling cell.

---
Regards,
Norman



"Andibevan" wrote in message
...
Is it possible to build a function that will place one half of the result
in
the active cell (as normal - cell where the formula is) and another part
of
the result in the cell to the right of the active one?

Something like this (which doesn't work incidentally):-

Function testoff(var)
testoff = var + 10
ActiveCell.Offset(1, 1).Value = 1


End Function







All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com