+ Reply to Thread
Results 1 to 2 of 2

please help shorten this code

  1. #1
    Registered User
    Join Date
    11-20-2013
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    2

    please help shorten this code

    any one can help me nest or shorten this code
    basically, i want to display the number of hours used for each month, and there are four condition

    if v or vu are find, then take the value from offset(,-1,) add all cells contain conditon, then display the sum
    if s or su are find, then take the value from offset(,-1), add all cells contain conditon, then display the sum
    i got the code working, just wonder if there is a better way of doing it.
    please help
    Please Login or Register  to view this content.
    i can attach the file if need.
    Last edited by 6StringJazzer; 11-22-2013 at 11:39 PM. Reason: code tags

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: please help shorten this code

    Hi newbie,

    Because you're new I have added the correct code tags for you but please take the time to review our rules. There aren't many, and they are all important.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Looking to shorten VBA code
    By swhite7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 06:31 PM
  2. [SOLVED] Very inefficient code because of different sizes of arrays, how do i shorten my code?
    By Brammer88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 04:49 PM
  3. [SOLVED] Shorten VBA Code......!!!!
    By sagar007 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-26-2012, 08:27 AM
  4. How to shorten code
    By daymo in forum Excel General
    Replies: 1
    Last Post: 02-26-2007, 05:39 PM

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