Closed Thread
Results 1 to 4 of 4

IF Statement with Replacement Function

  1. #1
    Registered User
    Join Date
    09-21-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2003
    Posts
    81

    IF Statement with Replacement Function

    Hello all, need a little help completing a macro that performs the following function within a row:

    If the value in the Col marked “Output Effective Date” in the header is greater than the Col marked “Start Date” but less than the Col marked “End Date”, then replace the value in Col marked “Start Date” with the value in Col marked “Output Effective Date.” Something like this:

    IF(value of “Output Effective Date” is GREATER THAN value of “Start Date” AND LESS THAN value of “End Date”) THEN value of “Start Date” is replaced with “Output Effective Date”

    Would need this to loop through a full worksheet (several thousand rows). “Output Effective Date”, “Start Date” and “End Date” are not always in the same column, which is why I want to use the headers (row 1) as the variables in the equation.

    Any help or guidance is most appreciated – thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: IF Statement with Replacement Function

    http://www.excelforum.com/excel-prog...-equation.html
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-21-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: IF Statement with Replacement Function

    Thanks but these are actually separate posts (different functions)

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: IF Statement with Replacement Function

    Seems identical to me

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed 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