Monday, 25 May 2015

VBA to create multiple sheets based on the cells value

Create Multiple Sheets based on the cell value through VBA

Sub Addsheet()
'Declaring the Variables
Dim i As Integer
Dim LastRow As Integer

'Finding Last Row in Sheet1
LastRow = Worksheets("Sheet1").Cells(Worksheets("Sheet1").Rows.Count, "A").End(xlUp).Row

'Using For Loop to Add Sheets by Cell Value
For i = 1 To LastRow
Sheets.Add
ActiveSheet.Name = Worksheets("Sheet1").Cells(i, 1).Value
Next i

End Sub

Lets Discuss the above code:
  1. We have defined two variable "i" and "LastRow".
  2. LastRow find the the row in "Sheet1" from Column "A". Because the list of sheets names are stored in "A" column in "Sheet1".
  3. We have used for loop to create multiple sheets untill all the sheets are created.
You can watch below video in action.



Tuesday, 13 January 2015

Count Function:

Count Function:
 Count function is one of the mostly used in excel. It is used to count the number of cells that contain numbers, and counts numbers within the list of arguments.

Syntax:

Count([value1], [value2], . . .)

The COUNT function syntax has these arguments:
  •   Value1    Required. The first item, cell reference, or range within which you want to count numbers.
  •  Value2 ...    Optional. Up to 255 additional items, cell references, or ranges within which you want to count numbers.


Tuesday, 6 January 2015

About Microsoft Excel

Microsoft Excel is a spreadsheet application developed by Microsoft for Microsoft Windows and Mac OS. It features calculation, graphing tools, pivot tables, and amacro programming language called Visual Basic for Applications. It has been a very widely applied spreadsheet for these platforms, especially since version 5 in 1993, and it has replaced Lotus 1-2-3 as the industry standard for spreadsheets. Excel forms part of Microsoft Office.


Getting Started with Excel


To open Microsoft Excel click on Windows StartèAll ProgramsèMicrosoft OfficeèMicrosoft Excel.

Also we can open Microsoft Excel through a run command by “excel” keyword.