Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a worksheet (based on a template) that has data imported into it in columns A to E. Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("F2:J2").copy destination:=Range("F2:J"& LastUsedRow)
should do it. Pete -----Original Message----- Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count -1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
With Range(Range("A2"),cells(lastrow,"E")) .Formula = Range("F2:J2").Formula End With Patrick Molloy Microsoft Excel MVP -----Original Message----- Hi, I have a worksheet (based on a template) that has data imported into it in columns A to E. Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks but it doesn't copy anything. I don't get an error just nothing
happens Any ideas? Thanks again for your help so far "Pete McCosh" wrote in message ... Range("F2:J2").copy destination:=Range("F2:J"& LastUsedRow) should do it. Pete -----Original Message----- Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count -1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can't think of anything. I've just tried it here, with
data in cells A2:E15 and some formulae in F2:J2 and: LastUsedRow = ActiveSheet.UsedRange.Row + _ ActiveSheet.UsedRange.Rows.Count - 1 Range("F2:J2").copy destination:=Range("F2:J"& LastUsedRow) worked fine. -----Original Message----- Thanks but it doesn't copy anything. I don't get an error just nothing happens Any ideas? Thanks again for your help so far "Pete McCosh" wrote in message ... Range("F2:J2").copy destination:=Range("F2:J"& LastUsedRow) should do it. Pete -----Original Message----- Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count -1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this code in a module that I run every week. I hope you can adjust
it to suit your needs. Ed ' Finds the last entry in Col A for the fill-down wb3.Activate wb3.Sheets(1).Select LastRow = wb3.Sheets(1).Range("A65536").End(xlUp).Row ' Runs the formulas in the last 7 columns down to the bottom With wb3.Sheets("Sheet1") .Range("V2:V" & LastRow).FillDown .Range("W2:W" & LastRow).FillDown .Range("X2:X" & LastRow).FillDown .Range("Y2:Y" & LastRow).FillDown .Range("Z2:Z" & LastRow).FillDown .Range("AA2:AA" & LastRow).FillDown .Range("AB2:AB" & LastRow).FillDown End With "Newbie" wrote in message ... Hi, I have a worksheet (based on a template) that has data imported into it in columns A to E. Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brilliant! at last something that works
Thanks very much "Ed" wrote in message ... I have this code in a module that I run every week. I hope you can adjust it to suit your needs. Ed ' Finds the last entry in Col A for the fill-down wb3.Activate wb3.Sheets(1).Select LastRow = wb3.Sheets(1).Range("A65536").End(xlUp).Row ' Runs the formulas in the last 7 columns down to the bottom With wb3.Sheets("Sheet1") .Range("V2:V" & LastRow).FillDown .Range("W2:W" & LastRow).FillDown .Range("X2:X" & LastRow).FillDown .Range("Y2:Y" & LastRow).FillDown .Range("Z2:Z" & LastRow).FillDown .Range("AA2:AA" & LastRow).FillDown .Range("AB2:AB" & LastRow).FillDown End With "Newbie" wrote in message ... Hi, I have a worksheet (based on a template) that has data imported into it in columns A to E. Columns F to J Row 2 have formulaes that I want to copy down to the last row that was used. I have found the last row used by: LastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1 How can I copy the formulas in col F to J into all rows down to the LastUsedRow |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel formula to copy/paste formula needed please. | Excel Discussion (Misc queries) | |||
copy formula result (text) only - without copying formula | Excel Discussion (Misc queries) | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
copy formula down a column and have cell references change within formula | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) |