hi every body

I have a sheet which contains some data from A to D columns and from 1 to 20 in the rows
now I want like this prosedure for my data by VB or Macro :

for example :

1. if in the B10 my condtition is true
2. in the corresponding row (cell "D10 ")copy a special formula
3. if it is false show "-" in the same cell
4. and repeat this procedure for all of my data (A1:D20)