+ Reply to Thread
Results 1 to 4 of 4

Adding nested if statement to existing script

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Adding nested if statement to existing script

    Below is an excerpt from a script being run to help me with some staffing calculations. I have almost know knowledge of how to write syntax, though I can understand a very basic amount. Any help is GREATLy appreciated.


    If t >= Cells(n, 5).Value And (t < b Or t >= (b + 30) )And t < Cells(n, 9).Value Then
    Cells(j, i + 10).Value = Cells(j, i + 10).Value + 1

    The section in red I want replaced with something similar (and functional) to :

    if(n,2 = 60, b + 100, b + 30)

    What would be the correct syntax to make this work?

    Thank You In advance
    Last edited by adammark; 01-29-2010 at 12:09 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Newbie in need of help

    Welcome to the forum,

    Please read the forum rules, thoroughly. Then update your title and add code tags as appropriate.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Newbie in need of help

    Sorry I should have read the rules. I can't find "go advanced"

    I'd like to change my title to, modifying existing script to include nested if statement.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Adding nested if statement to existing script

    After you push the Edit button, the Go Advanced button will appear.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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