+ Reply to Thread
Results 1 to 7 of 7

VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

  1. #1
    Registered User
    Join Date
    08-18-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    12

    VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    Hello,

    I have a list that starts on the 16th of one month and ends on the 15th of the next month which is attachedAttachment 442249. I currently have 31 rows, because the longest month has 31 days. I would like to either of the below, and am interested to hear if #1 can even work/ what your recommendations might be:

    1. Use VBA to add or delete rows the last 3 row (numbered 29-31 in column A) if the month is only 28, 29 or 30 days
    2. Use conditional formatting to turn all of the text color and fill color white, OR just delete the text?

    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    Try this formula instead...
    =IFERROR(IF(B12+1>=EDATE($B$12,1)-1,"",B12+1),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    Hi there,

    Take a look at the attached workbook and see if it does what you need.

    It uses formulas and conditional formatting based on the dates to show/hide the dates and text in the last three rows of the table.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    Hi again,

    The attached version of the previous workbook uses Conditional Formatting to remove the borders from whichever of the bottommost rows is/are appropriate.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-18-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    I'm don't think that solves the problem: If I set B12 to 2/16/16, I want B41 & B42 to either have white text and fill or be deleted.

    But I may be misunderstanding your formula?

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    This workbook has contitional formatting to hide the days greater than or equal to 29.
    In Conditional Formatting, New Rule, Use Formula... enter this formula and format the font as white.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In the Applies to the formula should be
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: VBA or Conditional Formatting for end of month BUT MORE COMPLICATED

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated

    I´m not sure if you gave me the Reputation before or after your last post, but I´m away from my computer and Excel for the next week. Let me know if you still have a problem and I´ll take a look at it when I get back.

    Best regards,

    Greg M

+ 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. Conditional formatting if the complicated requirements are met
    By gesaugen in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-28-2015, 07:13 AM
  2. [SOLVED] Complicated Conditional Formatting based on 2 Tables
    By mtma in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-07-2014, 03:59 PM
  3. Complicated Conditional Formatting - Help!!
    By ncindasun in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-14-2014, 05:27 AM
  4. [SOLVED] Complicated conditional formatting with multiple columns
    By jedidavidalan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2014, 05:09 AM
  5. Conditional Formatting with formula
    By christlivethinme in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2012, 02:30 AM
  6. Complicated conditional formatting problem.
    By hodges5378 in forum Excel General
    Replies: 2
    Last Post: 04-23-2008, 04:28 PM
  7. Complicated VBA Conditional Formatting
    By Leslie in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 06-30-2005, 04: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