Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluating a cell
if the content of a cell is the string made up of ="=sum(d3."&"d"&"1000)" which shows up as =sum(d3.d1000) how would one actually evaluate this in another cell so it would show the sum of the column d from cell 3 to 1000. Is there no eval(c1) or equivalent...
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluating a cell
Phillip, Not sure what you're asking in terms of the string, but here's some code to sum a column. dc Sub sum_column() 'select the range of cells you want to sum Range("D3:D1000").Select 'activate the cell where you want to show the answer Range("D1001").Activate 'write the answer using references rows in relation to the output cell ActiveCell.FormulaR1C1 = "=SUM(R[-998]C:R[-1]C)" End Sub ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluating a cell
Try this UDF
Function EvalCell(RefCell As String) EvalCell = Evaluate(RefCell) End Function Usage is: =EvalCell(cellref) Where cellref contains =SUM(D3:D1000) or simply SUM(D3:D1000) or A1 + A2 Gord Dibben XL2002 On Mon, 8 Dec 2003 16:46:04 -0800, "Phillip2001" wrote: if the content of a cell is the string made up of ="=sum(d3."&"d"&"1000)" which shows up as =sum(d3.d1000) how would one actually evaluate this in another cell so it would show the sum of the column d from cell 3 to 1000. Is there no eval(c1) or equivalent... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Evaluating formula in VBA | New Users to Excel | |||
#Value! error when evaluating data in a cell range | Excel Worksheet Functions | |||
Evaluating a range | Excel Discussion (Misc queries) | |||
evaluating text cell contents | Excel Discussion (Misc queries) | |||
Help Evaluating Cell Values and Changing Colors | Excel Programming |