+ Reply to Thread
Results 1 to 4 of 4

Flagging formula for file names that do not occur a set number of times

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Flagging formula for file names that do not occur a set number of times

    Hello All,
    Thanks for reading this. I have 3200 pictures that are all supposed to have 31 measurement points placed on them. When I copy the measurement data to Excel (roughly 99k rows), I need a conditional formatting formula that will highlight the cells if a file name does not occur exactly 31 times. I have attached an example of what I'm looking for, but here's the gist of it:

    A B C D
    File ID Point x y
    Number
    Apples.tif 1 147 44
    Apples.tif 2 147 182
    Apples.tif 3 148 245
    etc. etc. etc. etc.
    Apples.tif 31 55 370

    Oranges.tif 1 137 45
    Oranges.tif 2 160 203
    Oranges.tif 3 157 265
    etc. etc. etc. etc.
    Oranges.tif 32 50 299 <---- All the cells containing "Oranges.tif" would be highlighted because Oranges.tif occurs 32 times.

    Example 1.xlsx

    THANKS AGAIN!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Flagging formula for file names that do not occur a set number of times

    Highlight all the data from A2 down to the bottom of that column, then click on Conditional Formatting | New Rule | Use a formula ..., then put this formula into the dialogue box:

    =COUNTIF(A:A,A2)<>31

    Then click the Format button, then the Fill tab and choose your colour. Then click OK twice to exit the CF dialogue box.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Flagging formula for file names that do not occur a set number of times

    Try Conditional Format

    =(COUNTIF(A$2:A$125,A2)<>31)

    and highlight as required
    Use Format painter to copy to other cells in the list
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Flagging formula for file names that do not occur a set number of times

    Oh man! I can't believe I didn't think to use the COUNTIF function. That was a classic case of over-thinking things on my end.

    Thanks for your help, Pete!

+ 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