Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A curious question


Can someone explain why EXCEL's built-in functions (like SUM, AVERAGE,
IRR, NPV) cannot be replicated -in terms of efficiency and speed -using
VBA? As a related issue, what language does EXCEL's code source use?

Just curious.

David.


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=501971

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A curious question

- because Microsoft know all the ins and outs of Excel and the operating
system and so can take full advantage
- because VBA is not compiled
- because Excel uses compiled C code which is much faster than VB or VBA
- etc.

--

HTH

RP

"davidm" wrote in
message ...

Can someone explain why EXCEL's built-in functions (like SUM, AVERAGE,
IRR, NPV) cannot be replicated -in terms of efficiency and speed -using
VBA? As a related issue, what language does EXCEL's code source use?

Just curious.

David.


--
davidm
------------------------------------------------------------------------
davidm's Profile:

http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=501971



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A curious question


because Excel uses compiled C code which is
much faster than VB or VBA

Many thanks Bob. You have confirmed my sneaking suspicion. I will
reserve a clarification on Compiled vs Interpreted language for another
time.

David


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=501971

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default A curious question

Thanks for yur response. But i wanted to do the filtering operation
through VBA macro. so that the process can be automated.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A curious question

Don't forget also that when you use Excel, it is storing and updating
internal information all the time, so it has a whole bunch of information
that any user written routijne would probably have to determine. May not be
a big issue with say a simple SUM, but it could get critical in other areas,
such as determining the last value in a column.

There are so many reasons, which is why VBA should always be the last resort
IMO, never the first.

--

HTH

RP

"davidm" wrote in
message ...

because Excel uses compiled C code which is
much faster than VB or VBA

Many thanks Bob. You have confirmed my sneaking suspicion. I will
reserve a clarification on Compiled vs Interpreted language for another
time.

David


--
davidm
------------------------------------------------------------------------
davidm's Profile:

http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=501971





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A curious question

You seem to be responding to the wrong thread.

--

HTH

RP

wrote in message
oups.com...
Thanks for yur response. But i wanted to do the filtering operation
through VBA macro. so that the process can be automated.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A curious question


VBA the last resort never the first?

Sounds like a point of view designed to raise the temperature. Or one
for the pub!

Many is the time I have taken a traditional spreadsheet and re-written
the calculations into VBA to make the processing quicker and more
easily understood.

Regards,
Tony


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=501971

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default A curious question

Hi Tony,

Many is the time I have taken a traditional spreadsheet and re-written
the calculations into VBA to make the processing quicker


I would normally expect Excel formulae or inbuilt functions to be faster
than a corresponding VBA solution


---
Regards,
Norman



"tony h" wrote in
message ...

VBA the last resort never the first?

Sounds like a point of view designed to raise the temperature. Or one
for the pub!

Many is the time I have taken a traditional spreadsheet and re-written
the calculations into VBA to make the processing quicker and more
easily understood.

Regards,
Tony


--
tony h
------------------------------------------------------------------------
tony h's Profile:
http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=501971



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A curious question

I didn't say never, I said last resort.

--

HTH

RP

"tony h" wrote in
message ...

VBA the last resort never the first?

Sounds like a point of view designed to raise the temperature. Or one
for the pub!

Many is the time I have taken a traditional spreadsheet and re-written
the calculations into VBA to make the processing quicker and more
easily understood.

Regards,
Tony


--
tony h
------------------------------------------------------------------------
tony h's Profile:

http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=501971



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default A curious question

Turn on the macro recorder and then set your filter manually.

Now turn off the macro recorder and look at the recorded code. This will
show you how to do it with VBA. Debra's site also has VBA examples.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Thanks for yur response. But i wanted to do the filtering operation
through VBA macro. so that the process can be automated.



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
Just curious famdamly Excel Discussion (Misc queries) 2 December 7th 05 01:33 AM
Just curious RedChequer Excel Discussion (Misc queries) 3 March 10th 05 11:15 PM
Curious about SUMPRODUCT Wazooli Excel Worksheet Functions 5 December 20th 04 08:21 PM
Just Curious Mike Fogleman Excel Programming 7 September 30th 04 08:04 AM
Baffling, yet curious sparky3883[_2_] Excel Programming 3 April 12th 04 06:11 PM


All times are GMT +1. The time now is 08:49 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"