Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I want to copy several formulas in a row to the cells beneath them.
I'm using the following code For i = 3 To 30 Step 3 intAantal = Range("A1").Value + 1 Range(Cells(2, i)).Copy Range(Cells(3, i), Cells(intAantal, i)).Select ActiveSheet.Paste Next i I get an error message at the line with the Copy text but I don't understand what I'm doing wrong. Can someone help me out. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Frank,
You are trying to use a single range as the argument to a range, not necessary. Try this instead Cells(2,i).Copy Also, to copy formulae, you need to pastespecial, like so Range(Cells(3, i), Cells(intAantal, i)).PasteSpecial Paste:=xlFormulas -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Fam.Vink" wrote in message ... Hello, I want to copy several formulas in a row to the cells beneath them. I'm using the following code For i = 3 To 30 Step 3 intAantal = Range("A1").Value + 1 Range(Cells(2, i)).Copy Range(Cells(3, i), Cells(intAantal, i)).Select ActiveSheet.Paste Next i I get an error message at the line with the Copy text but I don't understand what I'm doing wrong. Can someone help me out. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you BoB, it worked.
Fred (instead of Frank) "Bob Phillips" schreef in bericht ... Hi Frank, You are trying to use a single range as the argument to a range, not necessary. Try this instead Cells(2,i).Copy Also, to copy formulae, you need to pastespecial, like so Range(Cells(3, i), Cells(intAantal, i)).PasteSpecial Paste:=xlFormulas -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Fam.Vink" wrote in message ... Hello, I want to copy several formulas in a row to the cells beneath them. I'm using the following code For i = 3 To 30 Step 3 intAantal = Range("A1").Value + 1 Range(Cells(2, i)).Copy Range(Cells(3, i), Cells(intAantal, i)).Select ActiveSheet.Paste Next i I get an error message at the line with the Copy text but I don't understand what I'm doing wrong. Can someone help me out. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry Fred, I saw Fam Vink, put 2 and 2 together, and got 5! At least I got
the answer right<vbg -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Fam.Vink" wrote in message ... Thank you BoB, it worked. Fred (instead of Frank) "Bob Phillips" schreef in bericht ... Hi Frank, You are trying to use a single range as the argument to a range, not necessary. Try this instead Cells(2,i).Copy Also, to copy formulae, you need to pastespecial, like so Range(Cells(3, i), Cells(intAantal, i)).PasteSpecial Paste:=xlFormulas -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Fam.Vink" wrote in message ... Hello, I want to copy several formulas in a row to the cells beneath them. I'm using the following code For i = 3 To 30 Step 3 intAantal = Range("A1").Value + 1 Range(Cells(2, i)).Copy Range(Cells(3, i), Cells(intAantal, i)).Select ActiveSheet.Paste Next i I get an error message at the line with the Copy text but I don't understand what I'm doing wrong. Can someone help me out. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy formulas from non-adjacent cells | Excel Discussion (Misc queries) | |||
copy formulas over merged cells | Excel Discussion (Misc queries) | |||
Skip cells and copy formulas | Excel Discussion (Misc queries) | |||
Copy several cells with formulas as they are? | Excel Discussion (Misc queries) | |||
How do I copy only cells with formulas in another row? | Excel Worksheet Functions |