Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step -1 method
Hi all, Just for knowledge that what kind of work "Step - 1" method
do and when it is used. Pleae can any friend can explain briefly as i wasn't able to find much information about this method. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step -1 method
Step is optional numeric expression which denotes the amount by which counter
is incremented each time through the loop. For intTemp = 10 to 1 Step-1 Next will have intTemp values in the order 10,9,8,7,6,... and Step -2 will have 10,8,6,4,2 If this post helps click Yes --------------- Jacob Skaria "K" wrote: Hi all, Just for knowledge that what kind of work "Step - 1" method do and when it is used. Pleae can any friend can explain briefly as i wasn't able to find much information about this method. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step -1 method
It's very useful when you want to process a range of rows from the bottom to the
top or a range of columns from the right to the left. Dim iRow as long with activesheet for irow = 20 to 10 step -1 if .cells(irow,"A").value = "" then .rows(irow).delete end if next irow end with or Dim iCol as long dim FirstCol as long Dim LastCol as long with activesheet firstcol = 1 lastcol = .cells(1,.columns.count).end(xltoleft).column for icol = lastcol to firstcol step -1 if .cells(1,icol).value = "" then .columns(icol).delete end if next icol end with Or just when you want to loop through any old array in reverse order. dim ictr as long dim myArr as variant myarr = array("something", "else","would", "go here") for ictr = ubound(myArr) to lbound(myarr) step -1 msgbox myarr(ictr) next ictr Or loop through a string dim iCtr as long dim myStr as string mystr = "Just for knowledge" for ictr = len(mystr) to 1 step -1 msgbox mid(mystr, ictr, 1) next ictr K wrote: Hi all, Just for knowledge that what kind of work "Step - 1" method do and when it is used. Pleae can any friend can explain briefly as i wasn't able to find much information about this method. -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step -1 method
The below link would help
http://msdn.microsoft.com/en-us/library/5z06z1kb.aspx If this post helps click Yes --------------- Jacob Skaria "K" wrote: Hi all, Just for knowledge that what kind of work "Step - 1" method do and when it is used. Pleae can any friend can explain briefly as i wasn't able to find much information about this method. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step -1 method
On Apr 20, 1:11*pm, Jacob Skaria
wrote: The below link would help http://msdn.microsoft.com/en-us/library/5z06z1kb.aspx If this post helps click Yes --------------- Jacob Skaria "K" wrote: Hi all, *Just for knowledge that what kind of work "Step - 1" method do and when it is used. Pleae can any friend can explain briefly as i wasn't able to find much information about this method.- Hide quoted text - - Show quoted text - thanks guys its very helpful |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a Drop Down List with Step by Step Instructions for 2007 | Excel Worksheet Functions | |||
Need step by step to add invoice numbering to excel template | New Users to Excel | |||
Excel 2000 Step By Step. What URL to use in Lesson 8? | New Users to Excel | |||
What is the step-by-step procedure for making a data list? | Excel Discussion (Misc queries) | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions |