+ Reply to Thread
Results 1 to 3 of 3

Macro for IF THEN conditions with Dynamic row range

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Sri lanka
    MS-Off Ver
    Excel 2003
    Posts
    34

    Unhappy Macro for IF THEN conditions with Dynamic row range

    hello,

    i need to automate some manual works using Macro.
    here i have attached the relevant excel sheet : if conditions.xlsx

    here number of rows are not a fixed,it may change day by day and i have to run macro every day.since macro should identify the number of rows (that's the most difficult part for me with my little macro knowledge)
    let assume that row index is i (ith row)

    if Bi="IH"
    then
    Ii=Si , Ji=Ti ,Ki=Ui,Li=Vi ,Mi=Wi , Ni=Xi ,Oi=Yi

    if (date of Ai= date of Bi)
    then
    Ii=Si , Ji=Ti ,Ki=Ui,Li=Vi ,Mi=Wi , Ni=Xi ,Oi=Yi

    if Bi= "Transfer"
    then
    Ii=Si , Ji=Ti ,Ki=Ui,Li=Vi ,Mi=Wi , Ni=Xi ,Oi=Yi

    if Bi= "Hold" or "Update next week"
    then
    Ii=Ji=Ki=Li="TBA"

    if Ai="Update next week" and Bi=Di
    then
    Ii=Ji=Ki=Bi and Li="Achievable"

    else

    I,J,K,L,M,N,O should be empty cells(no need to change )


    hope i will get a help from you to overcome this problem
    thanks very much

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Macro for IF THEN conditions with Dynamic row range

    Hi rsami,

    try this :
    Please Login or Register  to view this content.
    Please click the * below if this helps
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    Sri lanka
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Macro for IF THEN conditions with Dynamic row range

    Hi JasperD

    sorry for the late reply.
    thanks very much for your help and it works perfectly.
    i added you Reputation

    thanks again

+ 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