error

  • Thread starter Thread starter Jo
  • Start date Start date
J

Jo

Hi
I cannot get this to work.......
Range("F19").Select
ActiveCell.FormulaR1C1 = "=IF(OR(FRM100!
M16="Fail",FRM100!M18="Fail",FRM100!M20="Fail",FRM100!
M22="Fail",FRM100!M25="Fail",FRM100!M30="Fail",FRM100!
M44="Fail",FRM100!M55="Fail",FRM100!M60="Fail",FRM100!
M62="Fail"),"FAIL","PASS")"
thanks
Jo
 
Jo,

Two problems.

Don't use FormulaR1C1. Use Formula.

When placing double quotes within a quote delimited string, double the internal quotes.

ActiveCell.Formula =
"=IF(OR(FRM100!M16=""Fail"",FRM100!M18=""Fail"",FRM100!M20=""Fail"",FRM100!M22=""Fail"",FRM100!M25=""Fail"",FRM100!M30=""Fail"",FRM1
00!M44=""Fail"",FRM100!M55=""Fail"",FRM100!M60=""Fail"",FRM100!M62=""Fail""),""FAIL"",""PASS"")"
 
You have no continuation characters. Try this:

Range("F19").Select
ActiveCell.FormulaR1C1 = "=IF(OR(FRM100! _
M16="Fail",FRM100!M18="Fail",FRM100!M20="Fail",FRM100! _
M22="Fail",FRM100!M25="Fail",FRM100!M30="Fail",FRM100! _
M44="Fail",FRM100!M55="Fail",FRM100!M60="Fail",FRM100! _
M62="Fail"),"FAIL","PASS")"

TH

Hi
I cannot get this to work.......
Range("F19").Select
ActiveCell.FormulaR1C1 = "=IF(OR(FRM100!
M16="Fail",FRM100!M18="Fail",FRM100!M20="Fail",FRM100!
M22="Fail",FRM100!M25="Fail",FRM100!M30="Fail",FRM100!
M44="Fail",FRM100!M55="Fail",FRM100!M60="Fail",FRM100!
M62="Fail"),"FAIL","PASS")"
thanks
Jo
Try this in a macro:

Sub CopyUserSelectedCells()
Dim mySelection as Range
Set mySelection = Selection 'Assigns the current user selection,
'even if it's multiple non-contiguous cells
For Each C In mySelection
'copy each cell here to wherever you want
Worksheets("Name of new sheet").Range("Cell to copy to") = C
Next
End Sub


TH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top