+ Reply to Thread
Results 1 to 5 of 5

Simplify the Loop Statement

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Simplify the Loop Statement

    Hi,

    Can anyone help me to simplify this code,

    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Simplify the Loop Statement

    Hi Farid,

    How about something like this?
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Simplify the Loop Statement

    Hi Marvin,

    Thanks for willing to help me.

    It works but still use long code. I hope to have a simple code because I need to reduce one by one for the subsequent if statement until the last one. Column "SE" until "SY" will represent February to December and it will be reduced until December whereby only "SY" to be tested using if statement.

    Here is the description. Every IF statement tested will execute different output.
    Please Login or Register  to view this content.
    Last edited by Faridwahidi; 01-05-2015 at 02:31 AM.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Simplify the Loop Statement

    Ok then,

    Perhaps something like the below where you only need to give the first columns letters and it loops.

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Simplify the Loop Statement

    Hi MarvinP,

    Thanks for giving basic idea. I have found my working code

    Please Login or Register  to view this content.

+ 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. [SOLVED] Help writing loop to simplify code
    By phbryan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2014, 03:04 AM
  2. [SOLVED] Simplify a statement using SUM and IF?
    By CWatsonJr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-24-2014, 02:52 PM
  3. [SOLVED] Loop function to simplify VBA code
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 05-10-2014, 12:42 AM
  4. How to simplify 'Loop Until' code
    By GUERCHARD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2013, 08:39 AM
  5. Simplify IF statement
    By cch70 in forum Excel General
    Replies: 2
    Last Post: 07-30-2010, 04:38 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