Triskaidekaphobia! Or in English: Microsoft Excel Team’s fear of 13.


So today when I saw something that look like this it made me smile:

Public Enum ExcelVersionEnum
    Excel4 = 4
    Excel95 = 7
    Excel97 = 8
    Excel2000 = 9
    Excelxp = 10
    Excel2003 = 11
    Excel2007 = 12
    Excel2010 = 14    'Triskaidekaphobia!
End Enum

There is no Excel version 13.  I of course only just found this out when I encountered Excel 2010 which, I blush to admit, I have not downloaded from TechNet yet and played with.

Triskaidekaphobia (from Greek tris meaning “3,” kai meaning “and,” and deka meaning “10”) is fear of the number 13; it is a superstition and related to a specific fear of Friday the 13th, called paraskevidekatriaphobia or friggatriskaidekaphobia.

Source : en.wikipedia.org/wiki/Triskaidekaphobia

Continue reading “Triskaidekaphobia! Or in English: Microsoft Excel Team’s fear of 13.”

G Challenge III – Practice Excel VBA Interview question – Watch face maths


I have heard of this question coming up a little bit in all sorts of technical interviews so I thought I would set it as a G Challenge.

Question:

“Please tell me what you would implement to tell me the angle between then hands on a watch face at any given time of the day.  Please show your working and use these examples.”

6:00, 3:00, (lets make this non trivial now ) 9:15, 1:30 12:50,  3:20.

Answer Style:

It is up to you how you go about answering this, but I would try this in two stages. 

  1. Have a pen and paper and go about it as if you were in an interview, then :
  2. Actually try to write some VBA for a spreadsheet that goes about doing it.  Esp if you can call it from the sheet so your function returns the answer from an Excel Date Time entered in a cell.

Extra Homework:

  • Could you write this as a VB dll, C++ dll, C# XLL etc?
  • Does your function cope with 24hr time format?
  • Can you also output a list of times from an angle?  Ie. what times equate to 90 deg, 27 deg etc? 
    • If so can you output this as an array function so that a list can be shown in Excel?

Watch Accuracy Tracker


I had an idea the other day that I would write a small app in Excel to keep track of all my watches.

I was planning to use a constant source like :

http://time.is/

to keep track of the ‘real’ time and then have an ability to take a ‘snapshot’ of what the time is on each watch in a list ( that can be added to of course). This way using the inbuilt goodies of Excel all manner of graphs and stats can be applied to the raw data and people can see how their watch is behaving.

I was also thinking of adding a few features like resting orientation to see if any of the theories about leaving the watch 3 down, 9 down , dial up, dial down do influence the readings. Along with whether the chrono is running, is it being worn during the timing period etc.

Would anyone be interested in a copy of this? If anyone has any ideas / suggestions that would be great.

I am also thinking of using this as a quide too :

http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=finraddev-21&o=2&p=8&l=as4&m=amazon&f=ifr&asins=B004BLIW22

Essential tools for Excel VBA RAD (Rapid Application Development)


I guess a major point of RAD is speed.  The clue is right there in the name: Rapid Application Development.

So, all other things being equal, how do we go about getting more speed.  I don’t mean smashing out a load of garbage or not testing things. 🙂

I mean what things can be used to help productivity?  I am going to list a few here.

I will keep adding to this list, but if anyone knows of any good sources please add a comment and I will add it in.

Do you use protection? Really useful factoid – 002


We are all told that using protection is a good thing.  This applies to both real life and also programming, both in full OOP and the quasi OOP world of VBA / VB. It can be possible in some cases for your variables to be changed inside the sub / function you have called, even the ones one may have designated in your human mind as ‘input’ variables.   This can lead to odd behaviour and hard to find bugs.

So.. what am I going  on about?  Well I am talking about passing by value or by reference.  (Experienced VBA Programmers may want to skip this bit).   In VBA you can use two keywords ByRef or ByVal when defining your Sub or Function.   Continue reading “Do you use protection? Really useful factoid – 002”

G Challenge II – Roman Numerals


Ok, in quick sucession here is another G Challenge.  I think this one might be a bit of a stinker though!

II  (2) ;p   Functions that can be called from Excel to convert a number to its Roman equivalent, and also back from Roman to Normal.

So :

2010 -> MMX

Too easy… ?

231241 -> ccxxxMCCXLI

I have yet to attempt this myself as I normally set challenges from something I have had to do in the past I have found tricky.  This came from me choosing to put the challenge number as II not 2, and it popped into my head!

Edit:  I *know* that ROMAN() exists but that only goes up to 3999, and I am interpreting this as ‘classic’ numerals.    I think having looked at it that this is a massive challenge for a learner, but I have posted it now and we can always come back to it.   I’ll need something more sympathetic for GC III

G Challenge I


Ok, my friend is trying to learn Excel VBA and get into RAD development.   I am going to set a number of challenges which I am going to call a ‘G Challenge’  😛

So the first.  Take a string in the format :

20101124_170615_dd20101124_EOD.g

where the format is :

yyyymmdd_hhmmss_ddyyyymmdd_EOD.g

In VBA I would like 2 things. 

  1. The string back in the format dd-mmm-yy hh:mm
  2. An actual date serial

Example above would go to 

  1. 24-Nov-2010 17:06:15
  2. 40506.7126736111

Go!   I would use 2 seperate functions to start off with.

Answers will be forthcoming in a post G Answer I

New Financial Product Today – PRD & Callable PRD


After all my interviewing ( more on that to come ) I have a new contract. As such, a new bank and a new lot of things to learn. So while watching a training video I cam across a mention of PRD’s and callable PRD’s. I just had to look it up. Google didn’t yield as much, but trusty ol’ Wikipedia did the job as per usual.

Power Reverse Dual – there we go.

http://en.wikipedia.org/wiki/Power_reverse_dual_currency_note

http://giddy.org/sf/articles/structured_notes.pdf

Further Excel VBA RAD Interview Questions


I had an interview today.  I didn’t do all that well at all and I got a little bit schooled.

This always seems to happen on my first technical interview with any serious technical ‘harrasment’.  I also have a load of knowledge tucked away in my brain, none of which the guy wanted to know about sadly.

Here are the things he did want to know about that I really got flustered and couldn’t answer.  Embarrasingly I gave myself an 8 out of 10, when I actually performed like a 5.5.  I think he rated himself as an 8, and then quite easily proceeded to destroy me. 😦  boo.

So… back to the hard core technical stuff for me as I spent too long this week on the finance side and not enough on the actual RAD side, silly me.

Ranges:  How do you create a range that will grow as and when data is enetered into it.

  • Name the 5 types of join on a database
  • how can I get a range to grow when data is added ( VBA & Excel)
  • How can I change the Last Used cell in Excel.
  • C++ pointers
  • Basic C# questions.

Ooh, and make sure that you can eloquently discuss the previous projects you have had on your CV.  Especially be prepared to get right into the nitty gritty.  I was silly enough to let information like the usings and data types etc I was using in one of my projects I only stopped working on about 8 months ago.  Not great either.

If I have a column with data in it.

ab

cd

ef

and I want to add in another item of data, but have the range grow.  What can I do.

5 Types of Join – I was going to write the answer in here, but now I realise that what I need to do… is have a post dediected to SQL.  Any decent RAD developer is going to have to dig around in a database from time to time.  I think the problem I had is that I let the info go too stale, and didn’t keep on top of it.  I mean sure I seriously believe 100% I could do the job.  I would merely look in w3schools / Wikipedia for a few minutes and then be away and fine.  However… interviews just aren’t like that.  You need a decent answer, confident and concise right there, at the time to give the person that warm fuzzy glow that gets one hired.

Snippet :

Here are the first few things I selected to look at.   A simple glance over these for 30-90 mins before the interview would  have given me a massive boost in the interview:

http://www.w3schools.com/sql/sql_join.asp

http://www.tomjewett.com/dbdesign/dbdesign.php?page=jointypes.php

http://en.wikipedia.org/wiki/Join_%28SQL%29

Summary ( for my own revision )

Dynamic Ranges:

http://www.ozgrid.com/Excel/DynamicRanges.htm

Last Used Cell:

Run a small macro.. ActiveSheet.UsedRange.   Or you can do this in the Immediate window if you don’t want it to be anywhere in the code.

Create a free website or blog at WordPress.com.

Up ↑