PDA

View Full Version : Solved: Alternative to RICI notation in formula



oleg_v
07-14-2010, 05:46 AM
hi

how can i change this line:
ActiveCell.FormulaR1C1 = "=COUNTIF(C[-2],""<0.1"")"

in the macro to write some ather way not r1c1 because like this it hard to understand the line and edit it


thanks

Kenneth Hobs
07-14-2010, 08:26 AM
ActiveCell.Formula = "=COUNTIF(" & Columns(ActiveCell.Offset(0, -2).Column).Address(False, False) & ",""<0.1"")"

oleg_v
07-14-2010, 12:26 PM
thanks

where in this line can i put the range and the cell with the ansver??


Oleg

Kenneth Hobs
07-14-2010, 12:55 PM
It is unclear what you want. The solution that I gave replaces the line of code that you used.

oleg_v
07-14-2010, 01:03 PM
the code that i used is recorded by macro recorder and when wanted to change the range of data and the answer cell i faced a problem.
i thought that if you help me to change it so i will be able to undestand it and change the data but not sucsses.
please can you help me to over come my problem so i be able to change the range of data to k:k and answer cell to a8


thanks


Oleg

Kenneth Hobs
07-14-2010, 01:08 PM
Range("A8").Formula = "=COUNTIF(K:K,""<0.1"")"

oleg_v
07-14-2010, 01:09 PM
Finaly

thanks alot for all your help
and you time

Oleg