+ Reply to Thread
Results 1 to 6 of 6

Rationalizing code

  1. #1
    Registered User
    Join Date
    02-07-2010
    Location
    Manchesteer
    MS-Off Ver
    Excel 2007
    Posts
    51

    Rationalizing code

    Hi,

    I'm trying to reduce the following code down to a smaller ammount of code:

    Please Login or Register  to view this content.
    My guess was something like:

    Please Login or Register  to view this content.
    Note: c & d have been defined as objects at the start of the code.
    N15 = 7, O15 = 14 & P15 = 28

    Any idea's?
    Thanks,
    Mark
    Last edited by mark-ainsworth; 04-20-2011 at 07:37 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Rationalizing code

    Something like:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    02-07-2010
    Location
    Manchesteer
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Rationalizing code

    Thanks - could you tell me why my code doesn't work?

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Rationalizing code

    In what way does it not work?

    Mine should actually be this to replicate your original code:
    Please Login or Register  to view this content.
    and avoid double counting.

  5. #5
    Registered User
    Join Date
    02-07-2010
    Location
    Manchesteer
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Rationalizing code

    Not quite, if you look at my code - the 2nd two arguments are referring to O17 & P17 respectively, not just N17.

    So I have:

    Please Login or Register  to view this content.
    Can this be reduced further?

    Thanks,
    Mark

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Rationalizing code

    Actually my last should have been:
    Please Login or Register  to view this content.
    the original version I posted will count some things in two or three groups.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1