Showing posts from November, 2017

Select Column data dynamically

I want to share my best work for the people who have a passion for Microsoft Excel. I especially focussed on the VBA MACRO based Applications in MS EXCEL for, Automation of Reports Applications like sale purchase invoice printing. Etc... Today, I want to share my first coding in VBA to all. Sometimes you need to select dynamically the whole data from the column to copy them automatically in anywhere. Maybe sometimes it happens when your worksheet went full of data or filled partially but you need to select data of any column automatically till it's the last cell then? I have done the coding for that task. Here it is. Just paste it into your VBA module. Code: Sub Test_Module_1() 'By Kamal Bharakhda Sheets("Assignment No. 1").Activate Columns("B").Select A = Selection.Rows.Count LastCellofSheet = ActiveSheet.Cells(A, 2).Value MsgBox "WorkSheet's Last Cell Value is" & " = " & LastCellofSheet If LastCellofSheet = 0 Then MsgBox &qu