Nick's guide to Excel / VBA Interview Questions
I have hosted hundreds of Excel / VBA interviews, and I can work out very quickly how good someone is.
The biggest blunder to make in an interview is to say something like: "Oh, that's easy, I can do that in 5 minutes with the compiler and help files"
Well, in my interview, you have no compiler and no help files, so don't ignore syntax, or rely too much on help files.
You wouldn't turn up to a French interview with a dictionary and translate every word now would you ?
; - >
Here are some Excel VBA interview questions I might ask you.. Add a comment if you think you have a good answer.
- Nick's blog
- Login or register to post comments
- 136092 reads
First day
=TEXT(WEEKDAY(TODAY()-DAY(TODAY()-1)),"dddd")
First day of the month
that's the day of the week of the first day of the current month
First day
I seem to have problems with these questions! What else should the answer display?
First Day
If I understand the question right - below is the number of days in current year starting from Jan 1 to the first day of this month (including)
=DAYS360(DATE(YEAR(NOW()),1,1),DATE(YEAR(NOW()),MONTH(NOW()),1))
First Day
maybe I need to clarify
The first day of the current month right now is: 1st May 2009
The it will be only the part
The it will be only the part of the above:
=DATE(YEAR(NOW()),MONTH(NOW()),1)
1st day
is correct... u cld also use TODAY instead of NOW.
1st day
you could also use =eomonth(today(),-1)+1
3. VBA Range Selection Question
You have the following data:
- A1 is always populated
- the rest of the data may change
- write a VBA subroutine that selects A1 and up to and including the last populated cell on the diagonal going downwards and to the right.
So in this case: it will select A1:D4
How about this solution
Private Sub DiagSelect()
Dim colCount As Long
'Get the last column populated with data
colCount = ActiveSheet.UsedRange.Columns.Count
ActiveSheet.Range("A1", ActiveSheet.Cells(ActiveSheet.Rows.CountLarge, colCount).End(xlUp).Address).Select
End Sub