P
pierre brice
I have a function that needs a sumif which is using as criteria the cell
value from same column . I use a loop over several column, that is to say my
criteria is changing from column to column. that is why I would need that my
criteria for the sumif function would fix on the cell value and not on the
formula .
can you help me.
example
For i = 3 To 40 ' i are the lines
For col = 3 To 9 'col are the columns
'Sheets("page").Cells(i, col).Formula = "=SUMIF(Cells(1,7):Cells(1,
84),""=Cells(1, col)"",Cells(3;10):Cells(10;100))"
Next col
it does not check the value in Cells (1, col) but compares the value to
"=Cells(1, col)"
value from same column . I use a loop over several column, that is to say my
criteria is changing from column to column. that is why I would need that my
criteria for the sumif function would fix on the cell value and not on the
formula .
can you help me.
example
For i = 3 To 40 ' i are the lines
For col = 3 To 9 'col are the columns
'Sheets("page").Cells(i, col).Formula = "=SUMIF(Cells(1,7):Cells(1,
84),""=Cells(1, col)"",Cells(3;10):Cells(10;100))"
Next col
it does not check the value in Cells (1, col) but compares the value to
"=Cells(1, col)"