+ Reply to Thread
Results 1 to 4 of 4

If Statement + Find & Replace

  1. #1
    Forum Contributor
    Join Date
    11-29-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    104

    If Statement + Find & Replace

    I have a pieces of code I know (or at least strongly suspect) is not the most efficent way of doing this action:

    I have an IF statement that looks at a range of date, and if the previous month is not January, run code, and if it is January, run very similar code.
    This code runs as desired, but wondering if there is a more efficient way to achieve the results

    Here is what I have:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,612

    Re: If Statement + Find & Replace

    Untested, but try:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    11-29-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    104

    Re: If Statement + Find & Replace

    This works great. I was thinking along the lines of testing the date before doing the find and replace.
    This is great, thank you for your help!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,612

    Re: If Statement + Find & Replace

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find and replace where contents a formula so can't be seen by Find and replace.
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2015, 02:24 PM
  2. Replies: 16
    Last Post: 12-02-2014, 03:38 PM
  3. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  4. Replies: 0
    Last Post: 10-09-2013, 07:59 PM
  5. If statement, Find Replace, Concatenate in VBA code
    By almouchie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2012, 05:27 AM
  6. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  7. [SOLVED] How do I use an if statement with Find and Replace
    By Gerald in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2005, 06:05 PM

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