ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   The meaning of macro (https://www.excelbanter.com/excel-programming/367825-meaning-macro.html)

Jentan

The meaning of macro
 
May I know the meaning of the macro below.


Dim Filename As Variant
Dim ImpRng As Range
Dim r As Long, c As Integer
Dim txt As String, Char As String * 1
Dim data
Dim i As Integer
Dim lastrow As Integer, lastrow1 As Integer
Dim checkdate


Dim lastrow As Double, i As Double, j As Double, k As Double
Dim m As Double, n As Double
lastrow = WorksheetFunction.Count(Columns(10))
j = 1
k = 1
m = 1
n = 1
For i = 2 To lastrow

Kindly assist. Thank you


Jim Thomlinson

The meaning of macro
 
That macro really does not do much of anything. It declares a bunch of
variables (the Dim statements) and then it puts values into a bunch (but not
all) of those variables. The variable lastrow is populated with the number of
cells with stuff in them from column 10 (J). There is then the beginnings of
a loop to count from 2 to the lastrow

For i = 2 To lastrow

Next i
--
HTH...

Jim Thomlinson


"Jentan" wrote:

May I know the meaning of the macro below.


Dim Filename As Variant
Dim ImpRng As Range
Dim r As Long, c As Integer
Dim txt As String, Char As String * 1
Dim data
Dim i As Integer
Dim lastrow As Integer, lastrow1 As Integer
Dim checkdate


Dim lastrow As Double, i As Double, j As Double, k As Double
Dim m As Double, n As Double
lastrow = WorksheetFunction.Count(Columns(10))
j = 1
k = 1
m = 1
n = 1
For i = 2 To lastrow

Kindly assist. Thank you




All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com