Quick question...

S

Simon Lloyd

NPell;228828 said:
Whats the whole.
i = i +
thing about, i see it everywhere.Its purely a way of using a variable that will have an incrementa
number for use in code like
Code
-------------------
Range("A" & i).Value =
-------------------

--
Simon Lloy

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com
 
P

Pecoflyer

NPell;228828 said:
Whats the whole..
i = i + 1
thing about, i see it everywhere.

I don't think you'll find this kind of formula in Worksheet functions
but rather in programming.
It's usually increasing a counter by one in a loop and then doing some
test on the value

Intiliaze counter

Start
i=i+1
If i ( certain condition) then do sometning
Else go back to start


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload ->faster and better answers

*Adding your XL version* to your post helps finding solution faster
 
N

NPell

NPell;228828 Wrote:> Whats the whole..

number for use in code like
Code:
--------------------
    Range("A" & i).Value = i
--------------------

--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)

Thanks guys.
I see it in arrays alot.
Is it so that i can increase Array 2 along with Array 1?
Beacuse thats what im trying to acomplish...


See...
------------------------------------
myF1 = Array("T 1", "T 2", "T 3")
myF2 = Array("Team 1", "Team 2", "Team 3")

For Each F1 In myF1
Workbooks("Test.xls").Activate
Workbooks("Test.xls").Sheets("Source_Live").Select
Selection.AutoFilter Field:=8, Criteria1:=F2
Selection.AutoFilter Field:=28, Criteria1:="Monthly"
Cells.SpecialCells(xlCellTypeVisible).Copy Workbooks
("Template_3P.xls").Sheets(F1 & " Live M").Range("A1")
Workbooks("Test.xls").Sheets("Source_Live").ShowAllData
Next F1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top