Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
formulas
I wanted to repeat a formula contained into an initial cell in another
group of cells. I selected the initial formula in this manner: ActiveCell.select x=Selection.formula then I selected a group of cells and I wanted to repeat the same formula contained in the initial cell into these cells I wrote: SelectedRange.formula=x In this way the furmulas I find in the new cells are not equal to the initial one but they change from cell to cell according to the position. If I want to repeat exactly the initial formula in these new cells regardless of the cell positions what kind of instruction I have to use? Thank you in advance. Max |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
formulas
Max,
You need to change the original formula to an absolute reference. For example, if the formula is =A1+B1, change it to =$A$1+$B$1 -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Max_Venezia" wrote in message om... I wanted to repeat a formula contained into an initial cell in another group of cells. I selected the initial formula in this manner: ActiveCell.select x=Selection.formula then I selected a group of cells and I wanted to repeat the same formula contained in the initial cell into these cells I wrote: SelectedRange.formula=x In this way the furmulas I find in the new cells are not equal to the initial one but they change from cell to cell according to the position. If I want to repeat exactly the initial formula in these new cells regardless of the cell positions what kind of instruction I have to use? Thank you in advance. Max |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
formulas
The fact is that the original formula has not absolute reference and
it is correct. i want to transfer the same formula into another cell. for example if the cell a1 contains the formula =c1+b2 I want that all the destination cells have the same formula (=c1+b1) without the absolute reference. "Bob Phillips" wrote in message ... Max, You need to change the original formula to an absolute reference. For example, if the formula is =A1+B1, change it to =$A$1+$B$1 -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Max_Venezia" wrote in message om... I wanted to repeat a formula contained into an initial cell in another group of cells. I selected the initial formula in this manner: ActiveCell.select x=Selection.formula then I selected a group of cells and I wanted to repeat the same formula contained in the initial cell into these cells I wrote: SelectedRange.formula=x In this way the furmulas I find in the new cells are not equal to the initial one but they change from cell to cell according to the position. If I want to repeat exactly the initial formula in these new cells regardless of the cell positions what kind of instruction I have to use? Thank you in advance. Max |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
formulas
How about:
Sub CopyFormula() Dim cell As Range Dim strFormula As String strFormula = ActiveSheet.Range("A1").Formula ' change the range to whatever your destination range is For Each cell In ActiveSheet.Range("A3:A5") cell.Formula = strFormula Next cell Set cell = Nothing End Sub -- HTH, Dianne In om, Max_Venezia typed: The fact is that the original formula has not absolute reference and it is correct. i want to transfer the same formula into another cell. for example if the cell a1 contains the formula =c1+b2 I want that all the destination cells have the same formula (=c1+b1) without the absolute reference. "Bob Phillips" wrote in message ... Max, You need to change the original formula to an absolute reference. For example, if the formula is =A1+B1, change it to =$A$1+$B$1 -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Max_Venezia" wrote in message om... I wanted to repeat a formula contained into an initial cell in another group of cells. I selected the initial formula in this manner: ActiveCell.select x=Selection.formula then I selected a group of cells and I wanted to repeat the same formula contained in the initial cell into these cells I wrote: SelectedRange.formula=x In this way the furmulas I find in the new cells are not equal to the initial one but they change from cell to cell according to the position. If I want to repeat exactly the initial formula in these new cells regardless of the cell positions what kind of instruction I have to use? Thank you in advance. Max |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
formulas
Dianne,
Thank you very much. Max |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert Array Formulas to Regular Formulas | Excel Worksheet Functions | |||
E2007 formulas display as formulas, not results | Excel Worksheet Functions | |||
Counting # of Formulas in a column with formulas and entered data | Excel Worksheet Functions | |||
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP | Excel Worksheet Functions | |||
Formulas not evaluated, Formulas treated as strings | Excel Discussion (Misc queries) |