I've been a bit busy recently so blog traffic is a bit low :-(

I'm workin' on documenting a customer network, and one of the things I needed to do was calculate the number of fast Ethernet ports available on each floor. Since I have a little if & then experience from my PHP work I figured I could achieve this in excel.

Unfortunately excels if & then's aren't nested so this may look a little nasty.

=IF(B3=5509,7\*F3,IF(B3=6509,7\*F3,IF(B3=5505,3\*F3,IF(B3=5500,10\*F3,""))))

The deal is this, I have 4 types of switches Cat 5509, 5505, 5500 or 6509. Cell B3 tells me what type of switch I have, F3 tells me whether I'm using 24 or 48 port blades, and I assume that each Cat Switch has 2 supervisor cards.

The formula breaks down like this

if I have a 5509 then 7 x F3 else if I have a 5505 3 x F3 else if I have a 5500 10 x F3 else if I have a 6509 7 x F3 else Print Blank

sadly WordPress has hidden my nesting, but hopefully this makes sense :-)