Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Shane. I wrote that function successfully. I wrote a function to
test if a cell was a valid name field - not blank - not void - not numeric - etc. So that worked fine. Now I'm trying another one - which I will pose as a new question in the forum. "ShaneDevenshire" wrote: Hi, You might use something like this Function CountThis(R As Double) As Double CountThis = R + 1 End Function However, I ask why you would do this in a function if Excel already does this? Of course I realize this is just an example, but maybe you should tell us what you really want and we would provide more useful feedback. I replaced Long with Double, but that may or may not be acceptable. -- Thanks, Shane Devenshire "dhstein" wrote: I'm trying to write a User Defined Function and need the VB syntax to refer to the cell. For example if my function is called func1 and I put the formula =func1(B2) in my spreadsheet, I want to manipulate the contents of B2 in my function. What is the syntax to read/access the contents of cell B2 in my VB function? For example: function func1(Entry As Long) CellContents = ????????????? func1 = CellContents + 1 End Function Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
The NOW() syntax | Excel Discussion (Misc queries) | |||
SQL syntax | Excel Worksheet Functions | |||
VBA syntax | Excel Discussion (Misc queries) | |||
If then syntax | Excel Worksheet Functions | |||
Syntax Help | Excel Worksheet Functions |