Shorter nested IF statements in Excel

Posted in Programming, Tricks on November 27th, 2007 by Ryan

This code checks to see if A1 equals the letters K, H or L.

Instead of using:

=IF(A1="K",TRUE,IF(A1="H",TRUE,IF(A1="L",TRUE,FALSE)))

You can use:

=IF(OR(A1="K",A1="H",A1="L"),TRUE,FALSE)

As you can see, it’s a lot shorter and makes a lot more sense. Especially if you need to add more to it in the future.

Easy stylesheets with basic PHP

Posted in Programming, Tricks on November 14th, 2007 by Ryan

Create a file called stylesheet.php and link to it in you’re page. Then play with this code:

<?php
header(‘Content-type: text/css’);

// Colour scheme
$primary    = "#44749d";
$secondary  = "#c6d4e1";
$tertiary   = "#ffffff";
$quaternary = "#ebe7e0";
$quinary    = "#bdb8ad";
?>

BODY {
background: <?php echo $tertiary ?>;
color: #000000;
margin: 0px;
}

Find cool things to listen to with Last.fm

Posted in Tips on November 13th, 2007 by Ryan

www.last.fm – has a player that plays random music based on what you search for, and shows lots of info about who’s playing so you can go find more music by them.