Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum different sized (employee) teams ArcticWolf Excel Worksheet Functions 3 December 22nd 08 04:40 PM
How do I sum different sized ranges? darkfeld Excel Worksheet Functions 3 November 26th 08 11:44 PM
Row numbers have been re-sized Mick B Excel Discussion (Misc queries) 3 August 20th 08 04:18 PM
EPM REPORTS - Exporting 2007 excel reports to 2003 excel report Prashanthi Setting up and Configuration of Excel 0 February 18th 08 03:02 PM
Printing a legal sized document on letter sized paper Paula O. Excel Programming 0 February 2nd 04 06:55 PM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"