Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
andrew
 
Posts: n/a
Default undefined function error when creating xls pivot from mdb qry

Happens for both user-defined and built-in functions.

This "ExtractElement" function works in Access when used in a query, and
works in Excel when used as a formula." When attempting to create a
pivottable that points to the Access query using this formula, I get a
"Undefined function 'ExtractElement' in expression" error message. I was
attempting to work around this by using the InStrRev function in the query
the pivottable will point to, but get the same error message for that
built-in function as well: "Undefined function 'InStrRev' in expression." Is
there a setting that has to be enabled for Excel to recognize user-defined or
built-in functions being used in a query excel is to make a pivottable out
of? Thank you.

Public Function ExtractElement(str, n, sepChar)
' Returns the nth element from a string,
' using a specified separator character
Dim x As Variant
x = Split(str, sepChar)
If n 0 And n - 1 <= UBound(x) Then
ExtractElement = x(n - 1)
Else
ExtractElement = ""
End If
End Function

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Pivot Table lkw441 Charts and Charting in Excel 1 June 7th 05 04:06 AM
Pivot Table Problems Rachel Gonsior Excel Discussion (Misc queries) 3 March 21st 05 07:24 PM
pivot table yllee70 Excel Worksheet Functions 1 February 21st 05 10:49 PM
Excel's Pivot Table & Subtotal function should have a median fie. Mary Excel Worksheet Functions 1 December 3rd 04 03:27 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"