ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Evaluating formulas when a template is brought into a worksheet... (https://www.excelbanter.com/excel-programming/385992-re-evaluating-formulas-when-template-brought-into-worksheet.html)

Mark

Evaluating formulas when a template is brought into a worksheet...
 
ahh, I see I didn't even need the integer i .

I started to do something slightyly different, and then missed taking that
back out.

"mark" wrote:

Hi.

I have a template that has a bunch of formulas in it. It is stored as a
template, and then programatically brought into a workbook.

Some of the formulas in the template are intended to perform lookups against
named ranges in the worksheet that it is brought into. However, the formulas
do not evaluate when the template is brought in.

At first, I thought that just forcing a recalc would take care of it, but it
does not.

If I put this sbEval in, the formulas evaluate, and everything's fine:

***********
Sub sbEval()
Dim c As Range
Dim i As Integer
i = 1
For Each c In Range("rgRateLookup").Cells
c.Formula = c.Formula
Next c
End sub
*************

Is there a different better way to do that? It's not a lot of cells, this
will work. It's just that I thought recalc would handle it, and it didn't.

Thanks.



All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com