Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Excel formula similar to a loop in Basic?
Can anyone please tell me the Excel formula structure that would give values
similar to a FOR TO loop in Basic? It's for soccer results. At the moment I update the win, draw, and lost totals manually at the end of each column and row. e.g..... For n=1 to 8 If goalsfor(n) goalsagainst(n) then win=win+1 If goalsfor(n) = goalsagainst(n) then draw=draw+1 If goalsfor(n) < goalsagainst(n) then lost=lost+1 Next n So, I need a formula that will return the values of Win, Draw, and Lost :-) |
#2
|
|||
|
|||
A bit difficult to judge from here. But probably you can use the DataTable
command. Look in HELP for details. -- Kind Regards, Niek Otten Microsoft MVP - Excel "Cashtime" wrote in message ... Can anyone please tell me the Excel formula structure that would give values similar to a FOR TO loop in Basic? It's for soccer results. At the moment I update the win, draw, and lost totals manually at the end of each column and row. e.g..... For n=1 to 8 If goalsfor(n) goalsagainst(n) then win=win+1 If goalsfor(n) = goalsagainst(n) then draw=draw+1 If goalsfor(n) < goalsagainst(n) then lost=lost+1 Next n So, I need a formula that will return the values of Win, Draw, and Lost :-) |
#3
|
|||
|
|||
Thanks Niek. After looking deeply into Help, it looks like Array formulas may
be the solution. I'll let you know if they are! "Niek Otten" wrote: A bit difficult to judge from here. But probably you can use the DataTable command. Look in HELP for details. -- Kind Regards, Niek Otten Microsoft MVP - Excel "Cashtime" wrote in message ... Can anyone please tell me the Excel formula structure that would give values similar to a FOR TO loop in Basic? It's for soccer results. At the moment I update the win, draw, and lost totals manually at the end of each column and row. e.g..... For n=1 to 8 If goalsfor(n) goalsagainst(n) then win=win+1 If goalsfor(n) = goalsagainst(n) then draw=draw+1 If goalsfor(n) < goalsagainst(n) then lost=lost+1 Next n So, I need a formula that will return the values of Win, Draw, and Lost :-) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel version identification from Visual Basic | Excel Discussion (Misc queries) | |||
Throubles with Visual Basic and Excel | Excel Worksheet Functions | |||
Preserve Excel formula entry | Excel Discussion (Misc queries) | |||
Suddenly Excel can't calculate formula!!! | Excel Worksheet Functions | |||
Excel Time Duration Formula | Excel Worksheet Functions |