View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Curt D. Curt D. is offline
external usenet poster
 
Posts: 20
Default Formulas not working correctly

I have another formula that gives me the same answer everytime when it
shouldn't. The answer I get is "PLANNING", here is the code for this
problem. Any ideas on this one?

Range("I2").Select
ActiveCell.FormulaR1C1 = _

"=IF(RC[-7]0,IF(RC[10]0.1,""Sheetmetal"",IF(OR(RC[-2]=""C"",RC[-2]=""D"",RC[-2]=""M"",RC[-2]=""P"",RC[-2]=""X""),""Deferral"",IF(OR(RC[-2]=""H"",RC[-2]=""N"",RC[-2]=""Q"",RC[-2]=""T""),""Alert"",IF(OR(RC[-2]=""E"",RC[-2]=""F"",RC[-2]=""K"",RC[-2]=""S"",RC[-2]=""U""),""Planning"","""")))),"""")"
Range("I2").Select
Selection.Copy
Columns("I:I").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("I1").Select
Application.CutCopyMode = False
Selection.ClearContents

"Curt D." wrote:

I have a formula in a macro that combines (concatenate) to cells, the formula
is correct however when the macro runs it does not combine the cells. If I
stop the macro at that point where they should combine and go in to the
address bar and go to the end of the formula and press enter the formula will
start working. I don't want to go into each formula and press enter just to
get it working correctly. Does anyone know what is causing this? Any help
or explanation would be appreciated.