Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count to hide

Good Afternoon to everyone.

I need a vba module to check the duplicate cells value of each row
against other rows within the worksheet. The duplicate cells value do
not necessary be the same columns.

If the duplicate count is =10 times ,then the row will be hidden.

The check will start at the first row until the last row. This routine
will continue until the last row of the worksheet.

The worksheet range is from A7:T3000.

I also need the unhide routine to reset back to normal.

Thank you for any help given.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Count to hide

Sub macro1()
Dim iRow As Long
Dim rng As Range

For iRow = 7 To 3000
Set rng = Sheets("Sheet1").Range("A" & iRow & ":T" & iRow)
For Each c In rng
iRtn = Application.CountIf(rng, c)
If iRtn 10 Then
Sheets("Sheet1").Rows(iRow).EntireRow.Hidden = True
Exit For
End If
Next c
Next iRow
End Sub

HTH,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Count to hide

Michael168 wrote in message ...
Good Afternoon to everyone.

I need a vba module to check the duplicate cells value of each row
against other rows within the worksheet. The duplicate cells value do
not necessary be the same columns.

If the duplicate count is =10 times ,then the row will be hidden.



What row is hidden? The first duplicate row where count =10? All
duplicate rows after count=10? All duplicate rows in range for which
count=10?

regards
Paul
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count to hide

Paul Robinson wrote:
*Michael168 wrote in message
...
Good Afternoon to everyone.

I need a vba module to check the duplicate cells value of each row
against other rows within the worksheet. The duplicate cells value

do
not necessary be the same columns.

If the duplicate count is =10 times ,then the row will be hidden.



What row is hidden? The first duplicate row where count =10? All
duplicate rows after count=10? All duplicate rows in range for
which
count=10?

regards
Paul *


Hi Paul,

All duplicate rows in range for which count=10?
I also need a reset back routine i.e. to unhide back the hidden rows.

Thank you.
Michael168



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count to hide

merjet wrote:
*Sub macro1()
Dim iRow As Long
Dim rng As Range

For iRow = 7 To 3000
Set rng = Sheets("Sheet1").Range("A" & iRow & ":T" & iRow)
For Each c In rng
iRtn = Application.CountIf(rng, c)
If iRtn 10 Then
Sheets("Sheet1").Rows(iRow).EntireRow.Hidden = True
Exit For
End If
Next c
Next iRow
End Sub

HTH,
Merjet *


Hi Merjet,
I try your macro but not working.

Thanks anyway
Michael168



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Count to hide

Hi Merjet,
I try your macro but not working.


I can't help you if you can't say how it's amiss.
Btw, you haven't yet clearly described what you
want done.

Merjet


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count to hide

merjet wrote:
* Hi Merjet,
I try your macro but not working.


I can't help you if you can't say how it's amiss.
Btw, you haven't yet clearly described what you
want done.

Merjet *


The macros just don't do anything i.e it do not hide the rows when the
conditions meet.

Plse refer to my reply for more info.

Thank you
Michael168



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Count to hide

I need a vba module to check the duplicate cells value of each row
against other rows within the worksheet. The duplicate cells value do
not necessary be the same columns.


This seems clear w/o "against . . . worksheet". Inspecting CELLS in one
row does not call for inspecting any other rows at the same time. All
"against . . . worksheet" does is add confusion.

Then later you say:
All duplicate rows in range for which count=10?


Duplicate rows?? When the above said duplicate cells in a row?
Why don't you provide a short sample of data and indicate what
rows you think should be hidden (and why) and what rows you
think should not be hidden (and why not)?

Merjet





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you hide/un-hide the grid lines ED Excel Discussion (Misc queries) 4 February 26th 13 03:22 PM
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
How do I hide hide #REF! in Excel PerryK Excel Discussion (Misc queries) 3 February 27th 09 02:59 PM
Hide Unhide Hide again DTTODGG New Users to Excel 1 February 15th 06 03:22 PM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"