PC Review


Reply
Thread Tools Rate Thread

Advice on With-End With

 
 
kirkm
Guest
Posts: n/a
 
      16th May 2009
Hi,

I'm reading 11 columns in several hundred rows, processing them and
writing them back to a different sheet.

At the moment each value is assigned to a variant and after finishing
each row, they're sent to a function and and written to the other
sheet.

This lets me use one 'With' clause in the main routine and one
in the function.

I could write each one as it's done though, and wouldn't need to
assign a variant, nor call a function. Instead I'd need a pile of
nested 'With' loops.

Which way is best, please ? Or is it insignificant?

Thanks - Kirk
 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      16th May 2009
It's not clear what your current code looks like, or why an alternative
might require lots of nested for loops, so it's difficult to suggest which
approach is "best".

Best performance or best maintainability ? If the run time is not noticably
different then maintainability should trump.

Tim

<kirkm> wrote in message news:(E-Mail Removed)...
> Hi,
>
> I'm reading 11 columns in several hundred rows, processing them and
> writing them back to a different sheet.
>
> At the moment each value is assigned to a variant and after finishing
> each row, they're sent to a function and and written to the other
> sheet.
>
> This lets me use one 'With' clause in the main routine and one
> in the function.
>
> I could write each one as it's done though, and wouldn't need to
> assign a variant, nor call a function. Instead I'd need a pile of
> nested 'With' loops.
>
> Which way is best, please ? Or is it insignificant?
>
> Thanks - Kirk



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      16th May 2009
Perhaps you should post your code for comments

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"kirkm" wrote in message news:(E-Mail Removed)...
> Hi,
>
> I'm reading 11 columns in several hundred rows, processing them and
> writing them back to a different sheet.
>
> At the moment each value is assigned to a variant and after finishing
> each row, they're sent to a function and and written to the other
> sheet.
>
> This lets me use one 'With' clause in the main routine and one
> in the function.
>
> I could write each one as it's done though, and wouldn't need to
> assign a variant, nor call a function. Instead I'd need a pile of
> nested 'With' loops.
>
> Which way is best, please ? Or is it insignificant?
>
> Thanks - Kirk

 
Reply With Quote
 
kirkm
Guest
Posts: n/a
 
      17th May 2009
On Sat, 16 May 2009 16:02:26 +1200, kirkm wrote:

Thanks guys.... I couldn't impose my code on anyone though!
As well as bad it's extremely complex!

I'll leave it as is... it's fast enough and does what's required

Cheers - Kirk
 
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
Need some advice? =?Utf-8?B?TWFyaw==?= Microsoft VB .NET 5 19th Aug 2006 06:16 AM
Any more advice? =?Utf-8?B?Ymxhc3Q5?= Windows XP General 1 18th Feb 2005 01:07 PM
Looking for Advice newsreader AMD 64 Bit 1 2nd Dec 2004 07:40 AM
Advice sought on spam/virus's please! I have no knowledge on this subject and need advice please. CryOnwards Anti-Virus 2 15th Apr 2004 11:59 PM
Advice on advice given in the other Outlook thread (to: K-MyL) Trace Jackson Microsoft Outlook 8 2nd Nov 2003 04:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:32 AM.