Wednesday, August 27, 2008

Get Last Used Row

Sub get_last_used_row()
' to get the last non-blank row

LastRow1 = Cells(Cells.Rows.Count, "A").End(xlUp).Row
'this is the keyboard equivalent of selecting a range using shift and down arrow
'   Exercise What does "A" signify??

LastRow2 = UsedRange.Rows.Count

MsgBox "LastRow1 " & LastRow1
MsgBox "LastRow2 " & LastRow2

End Sub

Exercise - What is the difference between LastRow1 and LastRow2. Though they might give same results occasionally, the approach to get the last row is different. Find it out!


Tuesday, August 26, 2008

selcells

Sub selcells()
' this sub shows how to get a cell value
ActiveSheet.Select
cellval = Cells(1, "A")
MsgBox cellval
End Sub

Try writing a sub that copies value of A1 into B1 without use of an intermediate variable.

Monday, August 25, 2008

Msgbox Inputbox

Open excel
Do Alt F11
Paste -

Sub pgmhello()

MsgBox "Hello"
' accept name from user
name1 = InputBox("Name Please")

' concatenate hello and user name
MsgBox "Hello" & name1

End Sub

Click green triangular button or PF5

Try it!

Tuesday, May 27, 2008

PDF Converter, Split n Merge

I shy away from cumbersome WORD documents due to poor navigation between pages and delay in loading images and prefer to use PDFs. Google Documents is good but for files under size of mere 500 KB but beyond that it gives up.

I recently discovered an efficient and fast way of converting a file using services of Free PDF Converter. It is a 3 step process - Upload, Press Convert Button, Download. You have the option of uploading multiple files (maximum 5) in zipped format and you can also provide your email id to have the PDF emailed to you. A copy of the PDF is saved on the server which either you can delete immediately after downloading/ receiving the document or will be automatically deleted within 24 hours.



It helped me convert a 5 MB WORD document to a 2 MB PDF in less than 5 minutes. Pretty neat and quick!

PDFs too can be a hassle when it comes to split and merge. And for this exact purpose I dug up a software called PDF SAM. The basic version is free to download and is pretty sleek to use. It has a very simple user interface and a number of split options. Only the file order matters for merging. See the screen shots below.



Monday, May 05, 2008

Half Marathon

My take away from the big climb was information on marathon. My friend and I chose to enrol for 13 miles long half marathon scheduled for 29th June 2008. It provides the unprecedented opportunity to cross the 520 Bridge, the longest floating bridge in the world, on foot.

Am all excited and plan to train for the event. That reminds me that I need to buy new running shoes.

Volunteering while on Visa in US

Last week I decided to do some volunteer work for Seattle's Public Library. Since I'm on work visa, my friend advised me to check if I was legally authorized for volunteering.

I was flustered to know that volunteering could be illegal. But sources on www reveal that the law has been made to ensure Fair Labor Laws and I agree. Besides being unpaid, a job should fulfill several other criteria to be considered volunteer work.

A job can be considered volunteering if
  • it is really volunteer work i.e. nobody will expect any remuneration or compensation for the work.
  • is preferably for a non-charitable organization e.g. museum, church, public libraries.
  • the position has been unpaid in the past and continues to be so.
  • any American would perform the job without pay.
The information is relevant specifically to H1B and H4 Visa holders. Based on this, am ready to submit my application to SPL.

Sources on www that I read to reach conclusion -

Capitol Immigration Law Group LLC

Kevin Keane's advice

Information from Department of Labor

Murthy Law Firm Resource-1

Murthy Law Firm Resource-2

A word of caution from University of Washington

Off topic, stumbled on this interesting DOL's audit report [pdf] on Foreign Labor Programs and LCA procedures.

Friday, May 02, 2008

Harry Potter

Harry Potter - Level III