If/Then Formulas

R

Rick Rothstein \(MVP - VB\)

Nope, let's go back to Teethless mama's original form and modify it....

=((F7=3)+(F7<>""))*E7

There... one character shorter. <g>

Rick
 
R

Rick Rothstein \(MVP - VB\)

=E7*INT(1+F7/3)

Again, assuming DV, even shorter

=E7*INT((F7+1)/2)

Very nice!

LOL... I almost had that formula originally (I just needed to think about it
a "short" time more<g>).

Rick
 
J

John C

Someone just tapped me on the shoulder, it was a veterinarian, he told me to
step take my club and step away from the horse, as he is well and truly dead.
 
L

Lars-Åke Aspelin

Very nice!

LOL... I almost had that formula originally (I just needed to think about it
a "short" time more<g>).

Rick


Here is an even shorter

=E7*INT(F7^.7)

Lars-Åke
 
P

Peo Sjoblom

They certainly are
--


Regards,


Peo Sjoblom

Lars-Åke Aspelin said:
=E7*INT(F7^.7)

=EVEN(F7)/2*E7

Are they not of the same length? What am I missing?

Lars-Åke
 
J

John C

Your formula typed is good as gold, unfortunately, xl feels it must always
put a digit in front of the decimal, so your formula is actually:
=E7*INT(F7^0.7)
 
R

Rick Rothstein \(MVP - VB\)

Here is an even shorter
=E7*INT(F7^.7)

=EVEN(F7)/2*E7

Are they not of the same length? What am I missing?

Hmm! I believed John without bothering to actually count the characters. So,
I guess... It's a tie! Interesting though... two completely different
approaches coming in at so few characters.

Rick
 
P

Peo Sjoblom

That is because Excel has a bug/feature, if you enter the formula you enter
the same number of characters
so in my book they are the same size. I mean the only practical reason for
wanting a shorter formula must be
that you save time by entering less characters. Of course displayed using
default fonts your formula
actually takes up more cell space even if we include the padded zero <g>


--


Regards,


Peo Sjoblom
 
J

John C

Well, actually, the 'longer formula' causes the file size to be larger.
Admittedly just 1 character at a time, but it does actually take more memory
for the 'longer' formula.

I disagree with your assessment that the 0 before the decimal is a bug. It
is the value of 0 prior to the decimal, and this is a real and tangible value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top