Different Sized Reports
Hi
I work in Manufacturing and explode stoppage analysis reports from our ERP to Excel for our machinery on a daily basis. I have written a macro for summarising the info and formatting which saves me time however; the reports vary in size from day to day. I have created a column which sums the contents of the next two columns i.e =e2+f2 and using the macro record function I dragged this formula down a couple hundred rows to cover the report I was using to create the macro but this leaves 0 rows on days when the report I am running is not very large. Is there a formula I can use with the macro to only add the contents of e + f column when there is data there to add? so the report can be as large or small as it likes and my macro will still work Much Appreciated Brian |
Different Sized Reports
Dim rng as Range
set rng = Range(Cells(2,"F"),Cells(rows.count,"F").End(xlup) ) rng.offset(0,1).Formula = "=E2+F2" -- Regards, Tom Ogilvy wrote in message oups.com... Hi I work in Manufacturing and explode stoppage analysis reports from our ERP to Excel for our machinery on a daily basis. I have written a macro for summarising the info and formatting which saves me time however; the reports vary in size from day to day. I have created a column which sums the contents of the next two columns i.e =e2+f2 and using the macro record function I dragged this formula down a couple hundred rows to cover the report I was using to create the macro but this leaves 0 rows on days when the report I am running is not very large. Is there a formula I can use with the macro to only add the contents of e + f column when there is data there to add? so the report can be as large or small as it likes and my macro will still work Much Appreciated Brian |
All times are GMT +1. The time now is 01:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com