Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please don't think of a formula or function as copying from
one cell to another. Functions do not modify the content of any cell including itself. Instead think of a function as returning a value. In your case the value is the formula used in another cell. . You will find the use of the function very flexible as shown in the examples below. I think I understand what you want see my Show FORMULA of another cell in Excel http://www.mvps.org/dmcritchie/excel/formula.htm Function GetFormula(Cell) GetFormula = Cell.Formula End Function If you have a formula you will see the equal sign in front otherwise you see the constant. Examples of usage: =GetFormula(A1) =personal.xls!GetFormula('sheet one'!A1) additonal examples on my formula.htm webpage. If you ONLY want to see a formula or nothing. My preference is for GetFormula or GetFormulaI (getformulai) as shown on my web page but some people ask only to see an actual formula as you apparently have so you will also find. Function ShowFormula(cell) If cell.HasFormula Then ShowFormula = cell.Formula End Function --- 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 "Phillips" wrote in message news:q%WIb.251383$_M.1138230@attbi_s54... I would like to copy the formula from 1 cell to a different cell. I want to do this ONLY if there is a formula. For instance, I might have a formula in column D and F on worksheet "Test" in each row I would like to, on worksheet "Test2" to copy the actual formula into a give cell. How can I TEST for the presence of a formula, and then how can I copy the actual "=function()" to my new cell (preferably with a delimiter infront so I can actually see the formula. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
How do i copy a colored cell to another cell using a formula | Excel Discussion (Misc queries) | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
Copy exact value from one cell to new formula in another cell | Excel Discussion (Misc queries) | |||
copy contains from cell to cell w/ formula | Excel Worksheet Functions |