View Single Post
  #5   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 got it working, for some reason I had to remove a space in the cell, here
is the code I had to use to correct it.

Columns("X:X").Select
Selection.Insert Shift:=xlToRight
Range("X2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-22]0,CONCATENATE(RC[1],""
"",RC[5]),"""")"
Range("X2").Select
Selection.Copy
Columns("X:X").Select
ActiveSheet.Paste
Columns("X:X").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False


"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.