+ Reply to Thread
Results 1 to 10 of 10

VBA or Condtional Formatting

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Question VBA or Condtional Formatting

    Hello,

    so I've never done this kind of formula and am not sure if it can even be formatted, it may have to be VBA... what I would like is this:

    if column D5 rows 5-48 do nothave two entries of 2012 then highlight D4:G4 row 5.

    I really hope that makes sense!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: VBA or Condtional Formatting

    Hi Persais,

    Entries of 2012 ? Would it be 2012 or any date of year 2012 ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: VBA or Condtional Formatting

    yes, thats true, a date of 2012

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: VBA or Condtional Formatting

    Also

    then highlight D4:G4 row 5.
    ??

    D4:G4 already have row 4.. it can't be row 5 ?

    Please share the criteria clearly.. may be like if D5:D48 has any date of year 2012 then highlight the range D4:G4 .. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

    ---------- Post added at 08:28 PM ---------- Previous post was at 08:27 PM ----------

    Ok.. Please reply to my post#4 as well.. thanks

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    08-13-2012
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: VBA or Condtional Formatting

    Sorry - trying to make sense. D5:D48 has any date of 2012 two times then highlight range D4:G4 sounds right

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: VBA or Condtional Formatting

    Hi Persais,

    Use the below formula in conditional formatting logic :-

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See attached:- CF if two dates in 2012 year.xlsx


    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Registered User
    Join Date
    08-13-2012
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: VBA or Condtional Formatting

    thats awesome, thank you so much!!! is there a way to make it highlight if there are less than 2 dates of 2012? I think I explained it wrong above, so if there are less than 2 entires for 2012 I want it to highlight so its noticable...

    woulc I just change the > symbol?

    =(SUM(--(YEAR($D$5:$D$48)=2012)))<=2

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: VBA or Condtional Formatting

    Yes... try playing with < > symbols ...

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  9. #9
    Registered User
    Join Date
    08-13-2012
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: VBA or Condtional Formatting

    Thank you so much! you are wonderful!

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: VBA or Condtional Formatting

    You are welcome...

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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