ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do i declare a formula with prenamed variable (https://www.excelbanter.com/excel-programming/302420-how-do-i-declare-formula-prenamed-variable.html)

jeff

How do i declare a formula with prenamed variable
 
I declared a book a specific name but and gave a range a
specific range. when I write the formula on an opposing
workbook to count the amount of spaces it comes up as the
formula not the value. If someone could help me out I'd
appreciate it. Thanks in advance.

Jeff


Dim IDS As Range
Dim Fname As String


Fname = ActiveWorkbook.Name

ActiveCell.Offset(0, 7).Select
Range(Selection, Selection.End(xlDown)).Name = "IDS"

ActiveWindow.ActivateNext


ActiveCell.FormulaR1C1 = "=COUNT(FNAME&INS)"

'''This comes out as described above im stumped


david mcritchie

How do i declare a formula with prenamed variable
 
So am I.
Perhaps if you told us what you wanted to do, that might help.

What are you trying to count blanks in.

I do not see any correspondence between the code and
your description. And there may be information in the
subject title that is not included in the question. Make
sure that your question does not depend on anything
only included in the subject.

You might also check Tools, Options, View to
make sure that you do not have the formula view checked,

and the Calculation tab to make sure that
calculation is set to automatic.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jeff" wrote in message ...
I declared a book a specific name but and gave a range a
specific range. when I write the formula on an opposing
workbook to count the amount of spaces it comes up as the
formula not the value. If someone could help me out I'd
appreciate it. Thanks in advance.

Jeff


Dim IDS As Range
Dim Fname As String


Fname = ActiveWorkbook.Name

ActiveCell.Offset(0, 7).Select
Range(Selection, Selection.End(xlDown)).Name = "IDS"

ActiveWindow.ActivateNext


ActiveCell.FormulaR1C1 = "=COUNT(FNAME&INS)"

'''This comes out as described above im stumped






All times are GMT +1. The time now is 01:46 AM.

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