View Single Post
  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

Sub DoIt()
With Sheets("Input")
.Range("A1").FormulaR1C1 = "=IF(R2C20,""Yes"",""No"")"
.Range("A1").Offset(1) = 1
End With
End Sub

HTH Otto
"Adam1 Chicago" wrote in message
...
I am a VBA novice and posted some code like:

Sheets("Input").select
Range("A1").select
ActiveCell.FormulaR1C1 = "=IF(R2C20,""Yes"",""No"")"
ActiveCell.Offset(1,0).Select
ActiveCell.Value = 1

The groans were almost audible over the Internet! While this code gets
the
job done, I get the distinct impression that this is the slowest and
clunkiest way to do things. How else do I indicate the sheets and cell I
want to work in without selecting it?

Thanks