+ Reply to Thread
Results 1 to 10 of 10

Highlight first occurrence of an entry every month

  1. #1
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Highlight first occurrence of an entry every month

    Hi experts,

    I'm using this formula to highlight the first occurrence of each name in column A:

    =IF(COUNTIF($A$4:$A$1000,A4)=1,0,COUNTIF($A$4:A4,A4)=1)

    however, i need to modify this formula to highlight the first occurrence of each name each month of every year.

    The dates are listed in column B.

    Please help.
    If I've helped U pls click on d *Add Reputation

  2. #2
    Registered User
    Join Date
    09-02-2015
    Location
    California
    MS-Off Ver
    2013
    Posts
    23

    Re: Highlight first occurrence of an entry every month

    Its hard to picture what you are looking for, can you upload an example sheet?

  3. #3
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Highlight first occurrence of an entry every month

    the names are listed in column a and date in column B

    so

    John 08-13-2015 ---- highlight the name on this row
    John 08-14-2015
    John 08-15-2015
    Anna 08-03-2015 ---- highlight the name on this row
    Anna 08-04-2015
    Anna 08-05-2015

    hope this makes sense

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Highlight first occurrence of an entry every month

    Are the dates always in sequence (ascending order)?

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Highlight first occurrence of an entry every month

    Can you use column C as a helper with =DATE(YEAR(B1),MONTH(B1),1) etc in there? That will force the date to assess as the first of the month.

    Then you could use COUNTIFS with the second criteria checking against the forced 1st as well.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  6. #6
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Highlight first occurrence of an entry every month

    yes they are in sequence but for each name the dates can start on any weekday of the month.

    so:

    John 08-01-2014 -- highlight name
    John 08-02-2014
    John 08-03-2014
    John 08-03-2015 -- highlight name
    John 08-04-2015
    John 08-05-2015
    Anna 08-19-2015 -- highlight name
    Anna 08-20-2015
    Anna 08-21-2015

  7. #7
    Registered User
    Join Date
    09-02-2015
    Location
    California
    MS-Off Ver
    2013
    Posts
    23

    Re: Highlight first occurrence of an entry every month

    Assuming you have names in column A and Dates in column the following conditional rule should work for you (they worked for me).
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You might need a separate formula for the first row of data as that will not have a date to compare.

  8. #8
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Highlight first occurrence of an entry every month

    I had the conditional format already figured out and totally forgot this thread.

    But i appreciate the time and effort buddy!!! thank you so much.

  9. #9
    Registered User
    Join Date
    01-12-2017
    Location
    USA
    MS-Off Ver
    7
    Posts
    2
    Quote Originally Posted by bhenlee View Post
    I had the conditional format already figured out and totally forgot this thread.

    But i appreciate the time and effort buddy!!! thank you so much.
    Is it possible for you to share that formula? I am having similar problem.
    I have personal expense tracker that contains date from 1/1/16-12/31/16
    In Column A. All I am trying to do is conditionally format the entire
    row for the first occurrence on a given month, e.g, if the first occurrence of expense takes place on 2/5/16 then I would like to highlight
    the entire row for that date for the month of February.Similarly, if the first expense takes place in April 3 I want to get that row highlighted for April. I would if anyoneif anyone can help.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Highlight first occurrence of an entry every month

    The forum owner prefers that you start your own thread rather than asking your question in someone else's thread (even if it's related (yeah, I know, stupid rule)).
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Finding last occurrence of an entry and display adjacent cell.
    By stevenkimbell in forum Excel General
    Replies: 3
    Last Post: 08-31-2015, 05:43 PM
  2. Using index and match to return a value based on earliest occurrence (MONTH)
    By potatoman in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-09-2014, 06:12 AM
  3. Using index and match to return a value based on earliest occurrence (MONTH)
    By potatoman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2014, 06:16 AM
  4. Forcing month/year entry to last day of month
    By Gunther Maplethorpe in forum Excel General
    Replies: 8
    Last Post: 06-13-2013, 03:16 PM
  5. Location of the last occurrence of month in range
    By Hudas in forum Excel General
    Replies: 10
    Last Post: 02-27-2012, 10:34 AM
  6. Count Month Occurrence in range of date
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-18-2010, 05:20 AM
  7. Highlight oldest entry
    By bubba_chubs123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-08-2010, 02:14 PM

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