welshgasman
Well-known Member
- Joined
- May 25, 2013
- Messages
- 1,329
- Office Version
- 2007
- Platform
- Windows
Hi everyone,
Would appreciate a little help if possible please.
I was trying to help a colleague in work collating some data.
The sheet is a copy of all bank statements including name address and other irrelevant data (to us).
The data he required all had a valid date in column B, so I created a udf as below
to use the Isdate VBA function.
It worked great.
Just before finishing time he came over and told me it no longer worked on another sheet in the same workbook.
I checked, the function was still in a module in that workbook, and if you keyed it in on a sheet, it came up in the list of functions presented, yet after completing the formula the cell contains #NAME. In the little time possible I was unable to find the cause.
Does anyone have an idea what has gone wrong. He did rename the workbook, but is using the same workbook.
As an aside, I tried to make the function global in my setup by
a. Putting it in Personal.xlsm where I have various macros I use in all my workbooks
b. As an addin, saving as a .xla and .xlam file, and selecting the file in addins
It was still not recognised, did not even come up on the function list.
I've come home and tried option b in Excel 2003 (which is all I have) and it works fine in another workbook.
Puzzled to say the least. :D
TIA
Would appreciate a little help if possible please.
I was trying to help a colleague in work collating some data.
The sheet is a copy of all bank statements including name address and other irrelevant data (to us).
The data he required all had a valid date in column B, so I created a udf as below
Code:
Public Function IsADate(rngCell As Range) As Boolean
If IsDate(rngCell) Then
IsADate = True
Else
IsADate = False
End If
End Function
It worked great.
Just before finishing time he came over and told me it no longer worked on another sheet in the same workbook.
I checked, the function was still in a module in that workbook, and if you keyed it in on a sheet, it came up in the list of functions presented, yet after completing the formula the cell contains #NAME. In the little time possible I was unable to find the cause.
Does anyone have an idea what has gone wrong. He did rename the workbook, but is using the same workbook.
As an aside, I tried to make the function global in my setup by
a. Putting it in Personal.xlsm where I have various macros I use in all my workbooks
b. As an addin, saving as a .xla and .xlam file, and selecting the file in addins
It was still not recognised, did not even come up on the function list.
I've come home and tried option b in Excel 2003 (which is all I have) and it works fine in another workbook.
Puzzled to say the least. :D
TIA