Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding the last cell used in a file...
Hello all,
I need to copy a formula in B2 to all cells below it in column B. However, thus far, I haven't been able to locate the last used row i the file. I have copied the formula all the way to B65536. How do only copy it to the last row of the workbook? Any help would be much appreciated. Thanks, Trevo -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding the last cell used in a file...
Something like:
With ActiveSheet .Range("B2").Copy .Range(.Range("B3"), .Range("B" & _ .UsedRange.Row + .UsedRange.Rows.Count - 1)) End With -- Vasant "Jesterhoz " wrote in message ... Hello all, I need to copy a formula in B2 to all cells below it in column B. However, thus far, I haven't been able to locate the last used row in the file. I have copied the formula all the way to B65536. How do I only copy it to the last row of the workbook? Any help would be much appreciated. Thanks, Trevor --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding the last cell used in a file...
Trevor,
Here is an example Range("B2").AutoFill Destination:=Range("B2").Resize(Cells(Rows.Count, "B").End(xlUp).Row, 1) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jesterhoz " wrote in message ... Hello all, I need to copy a formula in B2 to all cells below it in column B. However, thus far, I haven't been able to locate the last used row in the file. I have copied the formula all the way to B65536. How do I only copy it to the last row of the workbook? Any help would be much appreciated. Thanks, Trevor --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding of temp file | Excel Discussion (Misc queries) | |||
finding where a file is stored | New Users to Excel | |||
Finding a temp file | Excel Discussion (Misc queries) | |||
finding a file | Excel Discussion (Misc queries) | |||
Finding the cell that is linked to a file | Excel Discussion (Misc queries) |