+ Reply to Thread
Results 1 to 1 of 1

VBA Syntax to loop and do if then else statements

  1. #1
    Registered User
    Join Date
    01-19-2011
    Location
    ny, ny
    MS-Off Ver
    Excel 2007
    Posts
    1

    VBA Syntax to loop and do if then else statements

    I am trying to write a VBA function that would do the following in my attachment:

    1. the range is Sheet!2D5:Sheet!2L5
    2. if D5 <= Sheet!1C6, then D5 = (the previous cell+Sheet!1C8)
    3. if D5 = Sheet!1C6, then D5 = the previous cell
    4. The above command (command 3) has to go cell by cell in the specified range, UNTIL the year over the cell, as specified by row 4 is equal to the one in Sheet1!C9 (in this case, the year is 7, so cell I5)
    5. cells I5 through L5 have to be multiplied by a given fraction so that L5 = 0

    obviously this needs to be some sort of a dynamic loop/function.... This is urgent please help!
    Attached Files Attached Files

+ 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