Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default EOMONTH compatibility issue (workaround?)

Hi, it’s me again needing an advice. Excel 2003: I am using the
EOMONTH (ATP) formula in a file. My Excel is in English, but my users
have different languages. I need to replace the EOMONTH formula. Now,
as far as I understand, I have at least three options:

1) Workbook_Open event to find and replace EOMONTH (Ron’s code
http://www.rondebruin.nl/atp.htm) = I Can not use this one, since my
users may or may not have ATP installed and I can not force them to
manually install it (corporate policy, not under my control). In my
English version I had the code to automatically install it, as
follows:

Private Sub Workbook_Open()
Calculate
If AddIns("Analysis ToolPak").Installed = False Or AddIns("Analysis
ToolPak - VBA").Installed = False Then
Calculate
AddIns("Analysis ToolPak").Installed = True
AddIns("Analysis ToolPak - VBA").Installed = True
End If
Calculate
End Sub

Works in XL English, but it won’t work if other language. Any
workaround????

2) Replace EOMONTH with =DATE(YEAR(start_date),MONTH(start_date)+months
+1,0)

3) Use this UDF (www.adamslim.com):
Function AdsEndOfMonth(ByVal InStartdate As Double, ByVal InMonths As
Integer)
'replaces the EOMONTH function
'by Adam Slim

AdsEndOfMonth = DateSerial(Year(InStartdate), Month(InStartdate) +
InMonths + 1, 0)
End Function

If I have to use option 2 or option 3, which one should do a better
job in terms of performance??? I have 10.000+ cells using EOMONTH, and
performance is important in this file.

I will really appreciate your advises, comments, pros/cons.

Thanks,
Cecilia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default EOMONTH compatibility issue (workaround?)


In general using simple worksheet functions on a worksheet is more
efficient that calling a UDF VBA function. There is an overhead
associated with calling a VBA function and VBA code is less eficient
that worksheet function in memory and speed.

Some worksheet functions use a lot of memory resources and slow down a
worksheet such as SUMPRTODUCT and using array functions (ones where you
put a curly bracket {} around the function).

VBA Macros macros can be used to speed up a workbook since worksheet
functions get automaticaly updated every time you make new entries on a
worksheet while VBA code can be run be run manually. There are lots of
exceptions to these generalizations so use them only as guidelines.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=207360

http://www.thecodecage.com/forumz

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default EOMONTH compatibility issue (workaround?)

On Jun 5, 11:26*am, joel wrote:
In general using simple worksheet functions on a worksheet is more
efficient that calling a UDF VBA function. *There is an overhead
associated with calling a VBA function and VBA code is less eficient
that worksheet function in memory and speed.

Some worksheet functions use a lot of memory resources and slow down a
worksheet such as SUMPRTODUCT and using array functions (ones where you
put a curly bracket {} around the function).

VBA Macros macros can be used to speed up a workbook since worksheet
functions get automaticaly updated every time you make new entries on a
worksheet while VBA code can be run be run manually. *There are lots of
exceptions to these generalizations so use them only as guidelines.

--
joel
------------------------------------------------------------------------
joel's Profile:http://www.thecodecage.com/forumz/member.php?u=229
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=207360

http://www.thecodecage.com/forumz


Thanks for your comments Joel. So based on it, it seems that option 2
(replace EOMONTH with formula =DATE(YEAR(start_date),MONTH(start_date)
+months
+1,0) ) should be more efficient??
Thank you,
Cecilia

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
Compatibility Issue WLMPilot Excel Discussion (Misc queries) 2 May 1st 10 10:23 PM
Compatibility Issue WLMPilot Excel Discussion (Misc queries) 2 March 8th 10 01:43 PM
Compatibility issue? Tom Excel Programming 11 November 30th 07 03:14 PM
could the #NAME? error be a compatibility issue? sweetsourpork New Users to Excel 2 November 23rd 07 07:35 PM
Code compatibility issue iamrajy[_4_] Excel Programming 1 October 17th 05 07:32 PM


All times are GMT +1. The time now is 09:08 PM.

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"