-
custom function error.
I'm trying to create a custom function to use in my spread sheet, but it return a #NAME error, what am i doing wrong?
[vba]Option Explicit
Function PV_list(WOs As Range) As String
Dim r As Range
Dim list As String
For Each r In WOs
list = list & "^" & r.Value
Next r
PV_list = list
End Function
[/vba]
Here is what it does:
Lets say A1 = a, A2 = b and A3 = c, by typing =PV_list(A1:A3) is should get the following output: a^b^c
This is saved in PERSONAL.xls.
Thanks.
Last edited by next; 04-14-2008 at 01:27 PM.
-
=PERSONAL.XLS!PV_list(A1:A4)
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Thanks, it's working, but is there any way to make it so that i won't have to type "=personal.xls!" all the time?
-
You could save the function in an Add-In (XLA file) See here
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Thanks i'll check that out!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules