Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I've got what must be a simple addressing problem but it's driving me
crazy. I can create a simple macro that just looks like: Sub TestMacro ActiveCell(1,2) = "Done" End Sub And it does exactly what I'd expect. It plugs a value into the cell to the right of the cursor. Now if I try to do the similar thing with a Function instead of a Macro it just refuses to co-operate. For example: Function TestFunct(CellRef) ActiveCell(1,2) = "Done" End Function This will croak with a #VALUE! error. Likewise: Function TestFunct(CellRef) CellRef(1,2) = "Done" End Function Also refuses to co-operate with the same error. Yet both of these approaches work fine for me in a Macro. How do I write to an arbitrary cell location from a Function? Thanks. Bill |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Indexing / Cell Addressing | Excel Discussion (Misc queries) | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
GET.CELL | Excel Worksheet Functions | |||
VLookup resulting in a blank cell... | Excel Worksheet Functions |