Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dede
 
Posts: n/a
Default what is a dumb or smart formula

our professor is asking us the difference between a dumb formula and a smart
formula and give an example. Any ideas?
  #2   Report Post  
RagDyer
 
Posts: n/a
Default

I've never explicitly heard of that before.

Maybe he means a formula that contains some type of error checking as being
"smart".

=A1/B1

As opposed to:

=IF(B1,A1/B1,"B1 Lacks Value")

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"dede" wrote in message
...
our professor is asking us the difference between a dumb formula and a

smart
formula and give an example. Any ideas?


  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

The concept is really open to interpretation!

In my opinion a "smart" formula is one that accounts for all the possible
things that might cause the formula to fail. Fail meaning, returning
incorrect results.

A very simple "dumb" formula is:

=VLOOKUP(A1,Sheet2!A1:B100,2,0)

I'll let you figure out why it's "dumb"!

Biff

"dede" wrote in message
...
our professor is asking us the difference between a dumb formula and a
smart
formula and give an example. Any ideas?



  #4   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default

Hi dede,

If I interprete smart=efficient and dumb=not_as_efficient then this might be
your example:

Task: Count the occurences of Thursdays between 1-Jan-2005 and 26-Jan-2005.

"Dumb" function:
=SUM(--(WEEKDAY(ROW(INDIRECT(1/1/5&":"&1/26/5)))=4))

"Smart" function (by Daniel M.):
=INT((1/26/5-WEEKDAY(1/26/5+1-4)-1/1/5+8)/7)

Both functions calculate the correct result 4. But the "dumb" function needs
about 20x more execution time (due to FastExcel) since it first generates
the whole date sequence and counts all occurences then.

HTH,
Bernd


  #5   Report Post  
Richard Buttrey
 
Posts: n/a
Default

On Fri, 14 Oct 2005 18:43:03 -0700, "dede"
wrote:

our professor is asking us the difference between a dumb formula and a smart
formula and give an example. Any ideas?


It really depends, as others have said, on your prof's definition of
dumb and smart.

I remember seeing an adult class of spreadsheet beginners, being shown
that the way to add the numbers in A1:A3 was to write A1+A2+A3, rather
than the rather obvious =SUM(A1:A3)

I suppose you could argue that the latter formula is smart since you
can add rows in between 1&3 without upsetting the accuracy of the
result.

Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


  #6   Report Post  
Biff
 
Posts: n/a
Default what is a dumb or smart formula

I'm feeling really dumb right now!

=SUM(--(WEEKDAY(ROW(INDIRECT(1/1/5&":"&1/26/5)))=4))
=INT((1/26/5-WEEKDAY(1/26/5+1-4)-1/1/5+8)/7)



As written, neither of those formulas work. If I replace the date strings
with either cell references or use an addional function, Datevalue (which
would be dumb!), then they do work. The first formula is an array and can be
made a non-array by using Sumproduct.

The second formula is very nice (Daniel M. always comes up with these slick
date formulas!) but............

How (why?) does it work?

The only part of it that I understand is /7!

Please explain the logic..........

WEEKDAY(1/26/5+1-4)

Why do you add 1 then subtract 4? What is the significance of that? What
does that mean?

Same thing for:

1/1/5+8

Why do you add 8 to the start date? What is the significance of that? What
does that mean?

Here's another thing to consider regarding the topic of this thread: How
does one know if their solution is "dumb" or "smart" ?

Is it "dumb" to use formulas you don't understand?

Biff

"Bernd Plumhoff" wrote in message
...
Hi dede,

If I interprete smart=efficient and dumb=not_as_efficient then this might
be your example:

Task: Count the occurences of Thursdays between 1-Jan-2005 and
26-Jan-2005.

"Dumb" function:
=SUM(--(WEEKDAY(ROW(INDIRECT(1/1/5&":"&1/26/5)))=4))

"Smart" function (by Daniel M.):
=INT((1/26/5-WEEKDAY(1/26/5+1-4)-1/1/5+8)/7)

Both functions calculate the correct result 4. But the "dumb" function
needs about 20x more execution time (due to FastExcel) since it first
generates the whole date sequence and counts all occurences then.

HTH,
Bernd



  #7   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default what is a dumb or smart formula

Hi Biff,

Was working with my German Excel version:
1/26/2005 should be the date constant 26-Jan-2005. Please enter the constant
38378.
1/1/2005 should be 1-Jan-2005. Please enter 38353.

Regards,
Bernd


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
IF formula? meris Excel Worksheet Functions 1 September 6th 05 07:14 AM
writing a formula for a colored value aaronwexler New Users to Excel 11 September 1st 05 03:11 PM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Simplify formula Luke Excel Worksheet Functions 37 May 6th 05 07:21 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


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