+ Reply to Thread
Results 1 to 9 of 9

Automatically hide rows with duplicated dates

  1. #1
    Registered User
    Join Date
    09-04-2019
    Location
    Harstad, Norway
    MS-Off Ver
    OFFICE365 MAC
    Posts
    6

    Automatically hide rows with duplicated dates

    Not sure how to solve this, maybe with macros.

    Screenshot at Sep 05 17-26-46.png

    I am using conditional formatting to show witch cells that have unique or duplicated date values.

    I need a way to automatically hide an entire row, and only on instances where one of the column have a green date value. Like row 9 (G9 and H9).

    How can I solve this?
    Last edited by 6StringJazzer; 09-05-2019 at 12:46 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help solving problem conditional formatting

    Welcome to the Forum cptolsen!

    As you suspect, this cannot be solved with conditional formatting and will need a macro.

    Please attach your actual file. The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Automatically hide rows with duplicated dates

    I have also updated your title to reflect your actual question rather than anticipated solution.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Quote Originally Posted by cptolsen View Post
    How can I solve this?
    You can easily use a filter with the reverse condition …

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Automatically hide rows with duplicated dates

    Quote Originally Posted by Marc L View Post
    You can easily use a filter with the reverse condition …
    How do you configure a filter that hides only unique (or only duplicated) data? Please be more specific with regard to the OP's example.

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

    Re: Automatically hide rows with duplicated dates

    Instead of using conditional formatting, you can use a similar formula in a helper column which will return TRUE or FALSE (or duplicate/unique, or hide/keep etc.) Then you can apply a filter on that column to hide whichever rows contain the appropriate identifier.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    08-27-2019
    Location
    Philippines
    MS-Off Ver
    365
    Posts
    6

    Re: Automatically hide rows with duplicated dates

    Try this.

    Sub HideDuplicate()
    For x = Range("G" & Rows.Count).End(xlUp).Row To 1 Step -1
    If x = 1 Then Exit For
    If Application.WorksheetFunction.CountIf(Range("G1:G" & x - 1), Range("G" & x).Value) >= 1 Then
    Rows(x & ":" & x).EntireRow.Hidden = True
    End If
    Next x
    End Sub

    Thanks to PaulSP8!

  8. #8
    Registered User
    Join Date
    09-04-2019
    Location
    Harstad, Norway
    MS-Off Ver
    OFFICE365 MAC
    Posts
    6

    Re: Automatically hide rows with duplicated dates

    Thank you guys!!

    Attached is the demo file.

    One more problem that I did not think about, there is one value that is repeated many times in the time column (H) and that is the value "At bay". I also need to mark that one as not repeated, if not it will make some problems when removing rows.

    Also, is there any place I can "translate" "english formulas" into "norwegian formulas", since I have to write them in my own language. If i use standard "english" formulas, i will get an error :/
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Quote Originally Posted by cptolsen View Post
    is there any place I can "translate" "english formulas" into "norwegian formulas", since I have to write them in my own language. If i use standard "english" formulas, i will get an error :/
    There are some websites to convert Excel formulas between languages
    but that's useless between English and your local version 'cause Excel stays internal in English !
    Take a glance to this thread

+ 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. I Need Help Solving This Problem
    By zZPingZz in forum Excel General
    Replies: 3
    Last Post: 07-09-2016, 09:04 AM
  2. [SOLVED] Solving a time problem with conditional formatting
    By smig123 in forum Excel General
    Replies: 4
    Last Post: 02-03-2014, 10:59 AM
  3. could any 1 help me in solving this problem..
    By banilam in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-30-2013, 07:48 PM
  4. Problem solving in VBA
    By Lv27 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2012, 10:17 AM
  5. [SOLVED] Conditional Problem Solving
    By Andrew in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-14-2006, 12:45 AM
  6. Replies: 1
    Last Post: 02-04-2006, 06:10 PM
  7. [SOLVED] problem solving
    By ClayTele in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-16-2005, 03:04 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