Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you hide/un-hide the grid lines | Excel Discussion (Misc queries) | |||
Want to Hide columns in spreadsheet but NOT hide data in chart. | Charts and Charting in Excel | |||
How do I hide hide #REF! in Excel | Excel Discussion (Misc queries) | |||
Hide Unhide Hide again | New Users to Excel | |||
How do I hide a worksheet in Excel and use a password to un-hide . | Excel Discussion (Misc queries) |