+ Reply to Thread
Results 1 to 4 of 4

To write a function for a series of if statements

  1. #1
    Registered User
    Join Date
    08-19-2009
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    56

    To write a function for a series of if statements

    In the following code I call a series of if statements again and again under different conditions. For example I have highlighted one set of those if statements. They are repeated again and again in the code under different if conditions. Is there a way to write a seperate function for this and call it ?



    Please Login or Register  to view this content.
    Last edited by nynamyna; 03-10-2011 at 12:21 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: To write a function for a series of if statements

    Yes, just simply save this part of the code as another function
    Please Login or Register  to view this content.
    Then call it by just simply using it's name:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-19-2009
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: To write a function for a series of if statements

    but the values under the if conditions changes ....only the if conditions are same...sorry i didn't post the full code...now i changed it...

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: To write a function for a series of if statements

    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)

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