PC Review


Reply
Thread Tools Rate Thread

Different Sized Reports

 
 
brian.baker13@googlemail.com
Guest
Posts: n/a
 
      4th Oct 2006
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 With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      5th Oct 2006
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

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oddly sized sized password textbox thechaosengine Microsoft ASP .NET 1 15th Sep 2005 08:34 PM
Different sized PCI cards Simon Computer Hardware 6 29th Oct 2004 12:29 AM
Printing a legal sized document on letter sized paper Paula O. Microsoft Excel Programming 0 2nd Feb 2004 06:55 PM
Printing Custom Sized Slides on letter sized paper Andrew Microsoft Powerpoint 1 4th Nov 2003 09:43 PM
2 different sized forms? Nick Mirro Microsoft Access Forms 1 27th Aug 2003 02:59 AM


Features
 

Advertising
 

Newsgroups
 


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