Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dan, Charles,
First of all, further thanks for your advice & assistance. Managed to do what I needed (I think!! Tested it & it seems to work... now to let the operator loose!) In the end, I had to go down the Macro route, rather than using the OFFSET function as I have a fairly huge formula in one column & I received an error message stating that the formula was too long!! Basically, it's checking against a customer's code & depending on the result does a CEILING calculation... some to th enearest 5p, others 9p. Anyway, the final macro that I used was as follows... Sub fillToLastRow() Dim qrylastRow As Long, fillRange As Range, calclastRow As Long qrylastRow = Range("A65536").End(xlUp).Row calclastRow = Range("v65536").End(xlUp).Row Range(Cells(4, 22), Cells(calclastRow, 29)).ClearContents Range(Cells(4, 22), Cells(calclastRow, 29)).ClearFormats Range("v3:Ac3").Copy _ Destination:=Range(Cells(4, 22), Cells(qrylastRow, 22)) End Sub As you can see, I had to use a copy/paste option, rather than the autofill as that didn't seem to work... however, using the logic provided enabled me to reach the required result. Also, having achieved this, then gave me the confidence to explore further hence the lines which clear both contents & formats of the prior calculated area before copying down the new one which helps keep the sheet looking tidy. So, once again, many thanks for your collective troubles pointing the way... and I've filed the code provided away for next time that I need it :-) Regards Colin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying formulae | Excel Worksheet Functions | |||
copying formulae | Excel Discussion (Misc queries) | |||
COPYING FORMULAE | Excel Worksheet Functions | |||
copying formulae | Excel Worksheet Functions | |||
Copying a formulae down a column that includes an INDIRECT | Excel Discussion (Misc queries) |