views:

42

answers:

3

while writing an algorithm dealing with excel data

if we want to compare each cell in a row we write

  1. foreach row
  2. foreach cell in a row
  3. jf ( cell.value > 100 )

but if we dont want to compare each cell in the row but only the cells of a particular collumn

then do we write like this ?

  1. foreach row
  2. if ( particular_collumn.cell.value > 100 )

or is there a better way to express this ?

A: 
$column_to_use = 7;
for ($i=0;$i++;$i<$column_to_use) {
    // do magic here
}

Seriously, silverkid, it's not rocket science ;)

Martin Hohenberg
my question was actually that does "particular_collumn.cell.value " looks good to write while wrinting an algorithm or not
silverkid
and it was an EXCEL question.
pavium
Pavium ... he told us about his excel file and "algorithms". Could be very much every language out there, including brainfuck and the Shakespeare Programming Language.
Martin Hohenberg
A: 

I assume this is pseudocode.

It looks OK, but I would emphasise the fact that the particular column was used to reference the cell in the row. IOW, something like this:

  1. foreach row
  2. if ([cell at particular_column of row].value > 100 )

...

K.

Shoko
thanks a lot . i got my answer
silverkid
+1  A: 

foreach specified_column
foreach cell in a column
jf ( cell.value > 100 )

ralu
that would check up all the cells of the excel document i want all cells of a particular collumn to be checked
silverkid
thanks a lot .. very usefull reply
silverkid