I ended up re-runing the same code after more data was added was added to the
other cells and it seems to work now. I guess excel wants the data in place
before the formula.
The logic I changed was:
Worksheets(shCurrent).Cells(i + 13, 5) = _
"=IF(ISERROR(SUMIF('Detail INC " & SchM & "'!G:G,C"
& i + 13
& ",'Detail INC " & SchM &
"'!J:J))=TRUE,0,SUMIF('Detail INC " &
SchM & "'!G:G,C" & i + 13 & ",'Detail INC " & SchM &
"'!J:J))"
changed to:
Worksheets(shCurrent).Cells(i + 13, 5).Formula = _
"=IF(ISERROR(SUMIF('Detail INC " & SchM & "'!G:G,C"
& i + 13
& ",'Detail INC " & SchM &
"'!J:J))=TRUE,0,SUMIF('Detail INC " &
SchM & "'!G:G,C" & i + 13 & ",'Detail INC " & SchM &
"'!J:J))"
Since the default to Cells(R,C) is value, I was confusing Excel by loading a
formula as a value (so I read on the web). Didn't help the process, I still have
to re-run the code, but it looks better.
I was thinking, Excel didn't load the values due to link to other sheets but
refreashing the links didn't help either. I wish I understood why this works,
but it does, and the client is happy.